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.ObjectAccessControlto 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",
},
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Storage
Assembly: Pulumi.Gcp.dll
Syntax
public class ObjectACL : CustomResource
Constructors
View SourceObjectACL(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 SourceBucket
The name of the bucket the object is stored in.
Declaration
public Output<string> Bucket { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Object
The name of the object to apply the acl to.
Declaration
public Output<string> Object { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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 SourceGet(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 |