Use a bucket-bound hostname, which replaces the storage.googleapis.com host with the name of
a CNAME bucket, e.g. a bucket named 'gcs-subdomain.my.domain.tld', or a Google Cloud Load
Balancer which routes to a bucket you own, e.g. 'my-load-balancer-domain.tld'. This cannot be
used alongside withVirtualHostedStyle() or withPathStyle(). This method
signature uses HTTP for the URI scheme, and is equivalent to calling
withBucketBoundHostname("...", UriScheme.HTTP).
Use a bucket-bound hostname, which replaces the storage.googleapis.com host with the name of
a CNAME bucket, e.g. a bucket named 'gcs-subdomain.my.domain.tld', or a Google Cloud Load
Balancer which routes to a bucket you own, e.g. 'my-load-balancer-domain.tld'. Note that this
cannot be used alongside withVirtualHostedStyle() or withPathStyle(). The
bucket name itself should not include the URI scheme (http or https), so it is specified via
a local enum.
Use it if signature should include the blob's content-type. When used, users of the signed
URL should include the blob's content-type with their request. If using this URL from a
browser, you must include a content type that matches what the browser will send.
Use it if signature should include the blob's canonicalized extended headers. When used,
users of the signed URL should include the canonicalized extended headers with their request.
Use a different host name than the default host name 'storage.googleapis.com'. This option is
particularly useful for developers to point requests to an alternate endpoint (e.g. a staging
environment or sending requests through VPC). If using this with the
withVirtualHostedStyle() method, you should omit the bucket name from the hostname, as it
automatically gets prepended to the hostname for virtual hosted-style URLs.
Generates a path-style URL, which places the bucket name in the path portion of the URL
instead of in the hostname, e.g 'https://storage.googleapis.com/mybucket/...'. This cannot be
used alongside withVirtualHostedStyle(). Virtual hosted-style URLs, which can be used
via the withVirtualHostedStyle() method, should generally be preferred instead of
path-style URLs.
Use if the URL should contain additional query parameters.
Warning: For V2 Signed URLs, it is possible for query parameters to be altered after the
URL has been signed, as the parameters are not used to compute the signature. The V4 signing
method should be preferred when supplying additional query parameters, as the parameters
cannot be added, removed, or otherwise altered after a V4 signature is generated.
Use if signature version should be V4. Note that V4 Signed URLs can't have an expiration
longer than 7 days. V2 will be the default if neither this or withV2Signature() is
called.
Use a virtual hosted-style hostname, which adds the bucket into the host portion of the URI
rather than the path, e.g. 'https://mybucket.storage.googleapis.com/...'. The bucket name is
obtained from the resource passed in. For V4 signing, this also sets the "host" header in the
canonicalized extension headers to the virtual hosted-style host, unless that header is
supplied via the withExtHeaders() method.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-21 UTC."],[],[]]