ObjectACL

class ObjectACL : KotlinCustomResource

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

Create an object ACL with one owner and one reader.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.storage.ObjectACL;
import com.pulumi.gcp.storage.ObjectACLArgs;
import com.pulumi.asset.FileAsset;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image_store = new Bucket("image-store", BucketArgs.builder()
.location("EU")
.build());
var image = new BucketObject("image", BucketObjectArgs.builder()
.bucket(image_store.name())
.source(new FileAsset("image1.jpg"))
.build());
var image_store_acl = new ObjectACL("image-store-acl", ObjectACLArgs.builder()
.bucket(image_store.name())
.object(image.outputName())
.roleEntities(
"OWNER:user-my.email@gmail.com",
"READER:group-mygroup")
.build());
}
}

Import

This resource does not support import.

Properties

Link copied to clipboard
val bucket: Output<String>

The name of the bucket the object is stored in.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val object: Output<String>

The name of the object to apply the acl to.

Link copied to clipboard
val predefinedAcl: Output<String>?

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleEntities: Output<List<String>>

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.

Link copied to clipboard
val urn: Output<String>