Show / Hide Table of Contents

Class GetObjectSignedUrl

Inheritance
System.Object
GetObjectSignedUrl
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Storage
Assembly: Pulumi.Gcp.dll
Syntax
public static class GetObjectSignedUrl

Methods

View Source

InvokeAsync(GetObjectSignedUrlArgs, InvokeOptions)

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.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var artifact = Output.Create(Gcp.Storage.GetObjectSignedUrl.InvokeAsync(new Gcp.Storage.GetObjectSignedUrlArgs
    {
        Bucket = "install_binaries",
        Path = "path/to/install_file.bin",
    }));
    var vm = new Gcp.Compute.Instance("vm", new Gcp.Compute.InstanceArgs
    {
    });
}

}

{{% /example %}} {{% /examples %}}

Full Example

using System.IO;
using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var getUrl = Output.Create(Gcp.Storage.GetObjectSignedUrl.InvokeAsync(new Gcp.Storage.GetObjectSignedUrlArgs
    {
        Bucket = "fried_chicken",
        Path = "path/to/file",
        ContentMd5 = "pRviqwS4c4OTJRTe03FD1w==",
        ContentType = "text/plain",
        Duration = "2d",
        Credentials = File.ReadAllText("path/to/credentials.json"),
        ExtensionHeaders = 
        {
            { "x-goog-if-generation-match", 1 },
        },
    }));
}

}
Declaration
public static Task<GetObjectSignedUrlResult> InvokeAsync(GetObjectSignedUrlArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetObjectSignedUrlArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetObjectSignedUrlResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.