Show / Hide Table of Contents

Class ObjectACL

Authoritatively manages the access control list (ACL) for an object in a Google Cloud Storage (GCS) bucket. Removing a gcp.storage.ObjectACL sets the acl to the private predefined ACL.

For more information see the official documentation and API.

Want fine-grained control over object ACLs? Use gcp.storage.ObjectAccessControl to control individual role entity pairs.

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 = new Gcp.Storage.BucketObject("image", new Gcp.Storage.BucketObjectArgs
    {
        Bucket = image_store.Name,
        Source = new FileAsset("image1.jpg"),
    });
    var image_store_acl = new Gcp.Storage.ObjectACL("image-store-acl", new Gcp.Storage.ObjectACLArgs
    {
        Bucket = image_store.Name,
        Object = image.OutputName,
        RoleEntities = 
        {
            "OWNER:user-my.email@gmail.com",
            "READER:group-mygroup",
        },
    });
}

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

Constructors

View Source

ObjectACL(String, ObjectACLArgs, CustomResourceOptions)

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

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

The unique name of the resource

ObjectACLArgs 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 the object is stored in.

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

Object

The name of the object to apply the acl to.

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

PredefinedAcl

The "canned" predefined 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 Object 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>, ObjectACLState, CustomResourceOptions)

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

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

ObjectACLState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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