Show / Hide Table of Contents

Class ObjectAccessControl

The ObjectAccessControls resources represent the Access Control Lists (ACLs) for objects within Google Cloud Storage. ACLs let you specify who has access to your data and to what extent.

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

READERs can get an object, though the acl property will not be revealed. OWNERs are READERs, and they can get the acl property, update an object, and call all objectAccessControls methods on the object. The owner of an object is always an OWNER. For more information, see Access Control, with the caveat that this API uses READER and OWNER instead of READ and FULL_CONTROL.

To get more information about ObjectAccessControl, see:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Storage Object Access Control Public Object

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var bucket = new Gcp.Storage.Bucket("bucket", new Gcp.Storage.BucketArgs
    {
    });
    var @object = new Gcp.Storage.BucketObject("object", new Gcp.Storage.BucketObjectArgs
    {
        Bucket = bucket.Name,
        Source = new FileAsset("../static/img/header-logo.png"),
    });
    var publicRule = new Gcp.Storage.ObjectAccessControl("publicRule", new Gcp.Storage.ObjectAccessControlArgs
    {
        Object = @object.OutputName,
        Bucket = bucket.Name,
        Role = "READER",
        Entity = "allUsers",
    });
}

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

Constructors

View Source

ObjectAccessControl(String, ObjectAccessControlArgs, CustomResourceOptions)

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

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

The unique name of the resource

ObjectAccessControlArgs 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}} (such as "user-liz@example.com&quot;)
  • group-{{groupId}}
  • group-{{email}} (such as "group-example@googlegroups.com&quot;)
  • domain-{{domain}} (such as "domain-example.com")
  • project-team-{{projectId}}
  • allUsers
  • allAuthenticatedUsers
Declaration
public Output<string> Entity { get; }
Property Value
Type Description
Output<System.String>
View Source

EntityId

The ID for the entity

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

Generation

The content generation of the object, if applied to an object.

Declaration
public Output<int> Generation { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Object

The name of the object to apply the access control to.

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

ProjectTeam

The project team associated with the entity

Declaration
public Output<ObjectAccessControlProjectTeam> ProjectTeam { get; }
Property Value
Type Description
Output<ObjectAccessControlProjectTeam>
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>, ObjectAccessControlState, CustomResourceOptions)

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

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

ObjectAccessControlState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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