Expand description
The DefaultObjectAccessControls resources represent the Access Control Lists (ACLs) applied to a new object within a Google Cloud Storage bucket when no ACL was provided for that object. ACLs let you specify who has access to your bucket contents 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 DefaultObjectAccessControl, see:
- API documentation
- How-to Guides
§Example Usage
§Storage Default Object Access Control Public
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let bucket = bucket::create(
"bucket",
BucketArgs::builder().location("US").name("static-content-bucket").build_struct(),
);
let publicRule = default_object_access_control::create(
"publicRule",
DefaultObjectAccessControlArgs::builder()
.bucket("${bucket.name}")
.entity("allUsers")
.role("READER")
.build_struct(),
);
}
§Import
DefaultObjectAccessControl can be imported using any of these accepted formats:
{{bucket}}/{{entity}}
When using the pulumi import
command, DefaultObjectAccessControl can be imported using one of the formats above. For example:
$ pulumi import gcp:storage/defaultObjectAccessControl:DefaultObjectAccessControl default {{bucket}}/{{entity}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments