Show / Hide Table of Contents

Class BucketACL

Authoritatively manages a bucket's ACLs in Google cloud storage service (GCS). For more information see the official documentation and API.

Bucket ACLs can be managed non authoritatively using the storage_bucket_access_control resource. Do not use these two resources in conjunction to manage the same bucket.

Permissions can be granted either by ACLs or Cloud IAM policies. In general, permissions granted by Cloud IAM policies do not appear in ACLs, and permissions granted by ACLs do not appear in Cloud IAM policies. The only exception is for ACLs applied directly on a bucket and certain bucket-level Cloud IAM policies, as described in Cloud IAM relation to ACLs.

NOTE This resource will not remove the project-owners-<project_id> entity from the OWNER role.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var image_store = new Gcp.Storage.Bucket("image-store", new Gcp.Storage.BucketArgs
    {
        Location = "EU",
    });
    var image_store_acl = new Gcp.Storage.BucketACL("image-store-acl", new Gcp.Storage.BucketACLArgs
    {
        Bucket = image_store.Name,
        RoleEntities = 
        {
            "OWNER:user-my.email@gmail.com",
            "READER:group-mygroup",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
BucketACL
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
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 class BucketACL : CustomResource

Constructors

View Source

BucketACL(String, BucketACLArgs, CustomResourceOptions)

Create a BucketACL resource with the given unique name, arguments, and options.

Declaration
public BucketACL(string name, BucketACLArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

BucketACLArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Bucket

The name of the bucket it applies to.

Declaration
public Output<string> Bucket { get; }
Property Value
Type Description
Output<System.String>
View Source

DefaultAcl

Configure this ACL to be the default ACL.

Declaration
public Output<string> DefaultAcl { get; }
Property Value
Type Description
Output<System.String>
View Source

PredefinedAcl

The canned GCS ACL to apply. Must be set if role_entity is not.

Declaration
public Output<string> PredefinedAcl { get; }
Property Value
Type Description
Output<System.String>
View Source

RoleEntities

List of role/entity pairs in the form ROLE:entity. See GCS Bucket ACL documentation for more details. Must be set if predefined_acl is not.

Declaration
public Output<ImmutableArray<string>> RoleEntities { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, BucketACLState, CustomResourceOptions)

Get an existing BucketACL resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static BucketACL Get(string name, Input<string> id, BucketACLState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

BucketACLState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
BucketACL
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.