GetObjectSignedUrl
The Google Cloud storage signed URL data source generates a signed URL for a given storage object. Signed URLs provide a way to give time-limited read or write access to anyone in possession of the URL, regardless of whether they have a Google account.
For more info about signed URL’s is available here.
Using GetObjectSignedUrl
function getObjectSignedUrl(args: GetObjectSignedUrlArgs, opts?: InvokeOptions): Promise<GetObjectSignedUrlResult>function get_object_signed_url(bucket=None, content_md5=None, content_type=None, credentials=None, duration=None, extension_headers=None, http_method=None, path=None, opts=None)func GetObjectSignedUrl(ctx *Context, args *GetObjectSignedUrlArgs, opts ...InvokeOption) (*GetObjectSignedUrlResult, error)public static class GetObjectSignedUrl {
public static Task<GetObjectSignedUrlResult> InvokeAsync(GetObjectSignedUrlArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Bucket string
The name of the bucket to read the object from
- Path string
The full path to the object inside the bucket
- Content
Md5 string The MD5 digest value in Base64. Typically retrieved from
google_storage_bucket_object.object.md5hashattribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide theContent-MD5HTTP header with this same value in its request.- Content
Type string If you specify this in the datasource, the client must provide the
Content-TypeHTTP header with the same value in its request.- Credentials string
What Google service account credentials json should be used to sign the URL. This data source checks the following locations for credentials, in order of preference: data source
credentialsattribute, providercredentialsattribute and finally the GOOGLE_APPLICATION_CREDENTIALS environment variable.- Duration string
For how long shall the signed URL be valid (defaults to 1 hour - i.e.
1h). See here for info on valid duration formats.- Extension
Headers Dictionary<string, string> As needed. The server checks to make sure that the client provides matching values in requests using the signed URL. Any header starting with
x-goog-is accepted but see the Google Docs for list of headers that are supported by Google.- Http
Method string What HTTP Method will the signed URL allow (defaults to
GET)
- Bucket string
The name of the bucket to read the object from
- Path string
The full path to the object inside the bucket
- Content
Md5 string The MD5 digest value in Base64. Typically retrieved from
google_storage_bucket_object.object.md5hashattribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide theContent-MD5HTTP header with this same value in its request.- Content
Type string If you specify this in the datasource, the client must provide the
Content-TypeHTTP header with the same value in its request.- Credentials string
What Google service account credentials json should be used to sign the URL. This data source checks the following locations for credentials, in order of preference: data source
credentialsattribute, providercredentialsattribute and finally the GOOGLE_APPLICATION_CREDENTIALS environment variable.- Duration string
For how long shall the signed URL be valid (defaults to 1 hour - i.e.
1h). See here for info on valid duration formats.- Extension
Headers map[string]string As needed. The server checks to make sure that the client provides matching values in requests using the signed URL. Any header starting with
x-goog-is accepted but see the Google Docs for list of headers that are supported by Google.- Http
Method string What HTTP Method will the signed URL allow (defaults to
GET)
- bucket string
The name of the bucket to read the object from
- path string
The full path to the object inside the bucket
- content
Md5 string The MD5 digest value in Base64. Typically retrieved from
google_storage_bucket_object.object.md5hashattribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide theContent-MD5HTTP header with this same value in its request.- content
Type string If you specify this in the datasource, the client must provide the
Content-TypeHTTP header with the same value in its request.- credentials string
What Google service account credentials json should be used to sign the URL. This data source checks the following locations for credentials, in order of preference: data source
credentialsattribute, providercredentialsattribute and finally the GOOGLE_APPLICATION_CREDENTIALS environment variable.- duration string
For how long shall the signed URL be valid (defaults to 1 hour - i.e.
1h). See here for info on valid duration formats.- extension
Headers {[key: string]: string} As needed. The server checks to make sure that the client provides matching values in requests using the signed URL. Any header starting with
x-goog-is accepted but see the Google Docs for list of headers that are supported by Google.- http
Method string What HTTP Method will the signed URL allow (defaults to
GET)
- bucket str
The name of the bucket to read the object from
- path str
The full path to the object inside the bucket
- content_
md5 str The MD5 digest value in Base64. Typically retrieved from
google_storage_bucket_object.object.md5hashattribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide theContent-MD5HTTP header with this same value in its request.- content_
type str If you specify this in the datasource, the client must provide the
Content-TypeHTTP header with the same value in its request.- credentials str
What Google service account credentials json should be used to sign the URL. This data source checks the following locations for credentials, in order of preference: data source
credentialsattribute, providercredentialsattribute and finally the GOOGLE_APPLICATION_CREDENTIALS environment variable.- duration str
For how long shall the signed URL be valid (defaults to 1 hour - i.e.
1h). See here for info on valid duration formats.- extension_
headers Dict[str, str] As needed. The server checks to make sure that the client provides matching values in requests using the signed URL. Any header starting with
x-goog-is accepted but see the Google Docs for list of headers that are supported by Google.- http_
method str What HTTP Method will the signed URL allow (defaults to
GET)
GetObjectSignedUrl Result
The following output properties are available:
- Bucket string
- Id string
The provider-assigned unique ID for this managed resource.
- Path string
- Signed
Url string The signed URL that can be used to access the storage object without authentication.
- Content
Md5 string - Content
Type string - Credentials string
- Duration string
- Extension
Headers Dictionary<string, string> - Http
Method string
- Bucket string
- Id string
The provider-assigned unique ID for this managed resource.
- Path string
- Signed
Url string The signed URL that can be used to access the storage object without authentication.
- Content
Md5 string - Content
Type string - Credentials string
- Duration string
- Extension
Headers map[string]string - Http
Method string
- bucket string
- id string
The provider-assigned unique ID for this managed resource.
- path string
- signed
Url string The signed URL that can be used to access the storage object without authentication.
- content
Md5 string - content
Type string - credentials string
- duration string
- extension
Headers {[key: string]: string} - http
Method string
- bucket str
- id str
The provider-assigned unique ID for this managed resource.
- path str
- signed_
url str The signed URL that can be used to access the storage object without authentication.
- content_
md5 str - content_
type str - credentials str
- duration str
- extension_
headers Dict[str, str] - http_
method str
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.