Show / Hide Table of Contents

Class GetProjectServiceAccount

Inheritance
System.Object
GetProjectServiceAccount
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 GetProjectServiceAccount

Methods

View Source

InvokeAsync(GetProjectServiceAccountArgs, InvokeOptions)

Get the email address of a project's unique Google Cloud Storage service account.

Each Google Cloud project has a unique service account for use with Google Cloud Storage. Only this special service account can be used to set up gcp.storage.Notification resources.

For more information see the API reference.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var gcsAccount = Output.Create(Gcp.Storage.GetProjectServiceAccount.InvokeAsync());
    var binding = new Gcp.PubSub.TopicIAMBinding("binding", new Gcp.PubSub.TopicIAMBindingArgs
    {
        Topic = google_pubsub_topic.Topic.Name,
        Role = "roles/pubsub.publisher",
        Members = 
        {
            gcsAccount.Apply(gcsAccount => $"serviceAccount:{gcsAccount.EmailAddress}"),
        },
    });
}

}

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

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