public static class Storage.PostPolicyV4Option extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
static Storage.PostPolicyV4Option |
signWith(com.google.auth.ServiceAccountSigner signer)
Provides a service account signer to sign the policy.
|
static Storage.PostPolicyV4Option |
withBucketBoundHostname(String bucketBoundHostname)
Use a bucket-bound hostname, which replaces the storage.googleapis.com host with the name of
a CNAME bucket, e.g.
|
static Storage.PostPolicyV4Option |
withBucketBoundHostname(String bucketBoundHostname,
Storage.UriScheme uriScheme)
Use a bucket-bound hostname, which replaces the storage.googleapis.com host with the name of
a CNAME bucket, e.g.
|
static Storage.PostPolicyV4Option |
withPathStyle()
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/...'.
|
static Storage.PostPolicyV4Option |
withVirtualHostedStyle()
Use a virtual hosted-style hostname, which adds the bucket into the host portion of the URI
rather than the path, e.g.
|
@TransportCompatibility(value=HTTP) public static Storage.PostPolicyV4Option signWith(com.google.auth.ServiceAccountSigner signer)
@TransportCompatibility(value=HTTP) public static Storage.PostPolicyV4Option withVirtualHostedStyle()
@TransportCompatibility(value=HTTP) public static Storage.PostPolicyV4Option withPathStyle()
withVirtualHostedStyle()
. Virtual hosted-style URLs, which
can be used via the withVirtualHostedStyle()
method, should generally be preferred
instead of path-style URLs.@TransportCompatibility(value=HTTP) public static Storage.PostPolicyV4Option withBucketBoundHostname(String bucketBoundHostname)
withVirtualHostedStyle()
or withPathStyle()
. This
method signature uses HTTP for the URI scheme, and is equivalent to calling withBucketBoundHostname("...", UriScheme.HTTP).
@TransportCompatibility(value=HTTP) public static Storage.PostPolicyV4Option withBucketBoundHostname(String bucketBoundHostname, Storage.UriScheme uriScheme)
withVirtualHostedStyle()
or withPathStyle()
. The
bucket name itself should not include the URI scheme (http or https), so it is specified via
a local enum.Copyright © 2023 Google LLC. All rights reserved.