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

ContentMd5 string

The MD5 digest value in Base64. Typically retrieved from google_storage_bucket_object.object.md5hash attribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide the Content-MD5 HTTP header with this same value in its request.

ContentType string

If you specify this in the datasource, the client must provide the Content-Type HTTP 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 credentials attribute, provider credentials attribute 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.

ExtensionHeaders 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.

HttpMethod 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

ContentMd5 string

The MD5 digest value in Base64. Typically retrieved from google_storage_bucket_object.object.md5hash attribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide the Content-MD5 HTTP header with this same value in its request.

ContentType string

If you specify this in the datasource, the client must provide the Content-Type HTTP 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 credentials attribute, provider credentials attribute 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.

ExtensionHeaders 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.

HttpMethod 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

contentMd5 string

The MD5 digest value in Base64. Typically retrieved from google_storage_bucket_object.object.md5hash attribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide the Content-MD5 HTTP header with this same value in its request.

contentType string

If you specify this in the datasource, the client must provide the Content-Type HTTP 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 credentials attribute, provider credentials attribute 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.

extensionHeaders {[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.

httpMethod 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.md5hash attribute. If you provide this in the datasource, the client (e.g. browser, curl) must provide the Content-MD5 HTTP header with this same value in its request.

content_type str

If you specify this in the datasource, the client must provide the Content-Type HTTP 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 credentials attribute, provider credentials attribute 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
SignedUrl string

The signed URL that can be used to access the storage object without authentication.

ContentMd5 string
ContentType string
Credentials string
Duration string
ExtensionHeaders Dictionary<string, string>
HttpMethod string
Bucket string
Id string

The provider-assigned unique ID for this managed resource.

Path string
SignedUrl string

The signed URL that can be used to access the storage object without authentication.

ContentMd5 string
ContentType string
Credentials string
Duration string
ExtensionHeaders map[string]string
HttpMethod string
bucket string
id string

The provider-assigned unique ID for this managed resource.

path string
signedUrl string

The signed URL that can be used to access the storage object without authentication.

contentMd5 string
contentType string
credentials string
duration string
extensionHeaders {[key: string]: string}
httpMethod 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-beta Terraform Provider.