Show / Hide Table of Contents

Class BucketAccessControl

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

The BucketAccessControls resource manages the Access Control List (ACLs) for a single entity/role pairing on a bucket. ACLs let you specify who has access to your data and to what extent.

There are three roles that can be assigned to an entity:

READERs can get the bucket, though no acl property will be returned, and list the bucket's objects. WRITERs are READERs, and they can insert objects into the bucket and delete the bucket's objects. OWNERs are WRITERs, and they can get the acl property of a bucket, update a bucket, and call all BucketAccessControls methods on the bucket. For more information, see Access Control, with the caveat that this API uses READER, WRITER, and OWNER instead of READ, WRITE, and FULL_CONTROL.

To get more information about BucketAccessControl, see:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Storage Bucket Access Control Public Bucket

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var bucket = new Gcp.Storage.Bucket("bucket", new Gcp.Storage.BucketArgs
    {
    });
    var publicRule = new Gcp.Storage.BucketAccessControl("publicRule", new Gcp.Storage.BucketAccessControlArgs
    {
        Bucket = bucket.Name,
        Role = "READER",
        Entity = "allUsers",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
BucketAccessControl
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 BucketAccessControl : CustomResource

Constructors

View Source

BucketAccessControl(String, BucketAccessControlArgs, CustomResourceOptions)

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

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

The unique name of the resource

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

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

Domain

The domain associated with the entity.

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

Email

The email address associated with the entity.

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

Entity

The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user liz@example.com would be user-liz@example.com. The group example@googlegroups.com would be group-example@googlegroups.com. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.

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

Role

The access permission for the entity.

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

Methods

View Source

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

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

Declaration
public static BucketAccessControl Get(string name, Input<string> id, BucketAccessControlState 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.

BucketAccessControlState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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