public static class Storage.SignUrlOption extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
static Storage.SignUrlOption |
httpMethod(HttpMethod httpMethod)
The HTTP method to be used with the signed URL.
|
static Storage.SignUrlOption |
signWith(com.google.auth.ServiceAccountSigner signer)
Provides a service account signer to sign the URL.
|
static Storage.SignUrlOption |
withContentType()
Use it if signature should include the blob's content-type.
|
static Storage.SignUrlOption |
withExtHeaders(Map<String,String> extHeaders)
Use it if signature should include the blob's canonicalized extended headers.
|
static Storage.SignUrlOption |
withHostName(String hostName)
Use a different host name than the default host name 'https://storage.googleapis.com'.
|
static Storage.SignUrlOption |
withMd5()
Use it if signature should include the blob's md5.
|
static Storage.SignUrlOption |
withPathStyle()
Generate 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.SignUrlOption |
withV2Signature()
Use if signature version should be V2.
|
static Storage.SignUrlOption |
withV4Signature()
Use if signature version should be V4.
|
static Storage.SignUrlOption |
withVirtualHostedStyle()
Use a virtual hosted-style hostname, which adds the bucket into the host portion of the URI
rather than the path, e.g.
|
public static Storage.SignUrlOption httpMethod(HttpMethod httpMethod)
public static Storage.SignUrlOption withContentType()
public static Storage.SignUrlOption withMd5()
public static Storage.SignUrlOption withExtHeaders(Map<String,String> extHeaders)
public static Storage.SignUrlOption withV2Signature()
withV4Signature()
is called.public static Storage.SignUrlOption withV4Signature()
withV2Signature()
is
called.public static Storage.SignUrlOption signWith(com.google.auth.ServiceAccountSigner signer)
public static Storage.SignUrlOption withHostName(String hostName)
withVirtualHostedStyle()
method, you should omit the bucket name from the hostname, as it automatically gets prepended
to the hostname for virtual hosted-style URLs.public static Storage.SignUrlOption withVirtualHostedStyle()
withExtHeaders()
method.public static Storage.SignUrlOption withPathStyle()
withVirtualHostedStyle()
. Virtual hosted-style URLs, which
can be used via the withVirtualHostedStyle()
method, should generally be preferred
instead of path-style URLs.Copyright © 2019 Google LLC. All rights reserved.