import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const someBucket = new scaleway.ObjectBucket("someBucket", {}); * const main = new scaleway.ObjectBucketAcl("main", { * bucket: scaleway_object_bucket.main.id, * acl: "private", * }); * ``` * * For more information, refer to the [PutBucketAcl API call documentation](https://www.scaleway.com/en/docs/storage/object/api-cli/bucket-operations/#putbucketacl). * * ### With Grants * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const mainObjectBucket = new scaleway.ObjectBucket("mainObjectBucket", {}); * const mainObjectBucketAcl = new scaleway.ObjectBucketAcl("mainObjectBucketAcl", { * bucket: mainObjectBucket.id, * accessControlPolicy: { * grants: [ * { * grantee: { * id: ":", * type: "CanonicalUser", * }, * permission: "FULL_CONTROL", * }, * { * grantee: { * id: "", * type: "CanonicalUser", * }, * permission: "WRITE", * }, * ], * owner: { * id: "", * }, * }, * }); * ``` * * ## The ACL * * Refer to the [official canned ACL documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) for more information on the different roles. * * ## The access control policy * * The `accessControlPolicy` configuration block supports the following arguments: * * * `grant` - (Required) Set of grant configuration blocks documented below. * * `owner` - (Required) Configuration block of the bucket owner's display name and ID documented below. * * ## The grant * * The `grant` configuration block supports the following arguments: * * * `grantee` - (Required) Configuration block for the project being granted permissions documented below. * * `permission` - (Required) Logging permissions assigned to the grantee for the bucket. * * ## The permission * * The following list shows each access policy permissions supported. * * `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL` * * For more information about ACL permissions in the S3 bucket, see [ACL permissions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html). * * ## The owner * * The `owner` configuration block supports the following arguments: * * * `id` - (Required) The ID of the project owner. * * `displayName` - (Optional) The display name of the owner. * * ## the grantee * * The `grantee` configuration block supports the following arguments: * * * `id` - (Required) The canonical user ID of the grantee. * * `type` - (Required) Type of grantee. Valid values: CanonicalUser. * * ## Import * * Bucket ACLs can be imported using the `{region}/{bucketName}/{acl}` identifier, as shown below: * * bash * * ```sh * $ pulumi import scaleway:index/objectBucketAcl:ObjectBucketAcl some_bucket fr-par/some-bucket/private * ``` * * ~> **Important:** The `project_id` attribute has a particular behavior with s3 products because the s3 API is scoped by project. * * If you are using a project different from the default one, you have to specify the project ID at the end of the import command. * * bash * * ```sh * $ pulumi import scaleway:index/objectBucketAcl:ObjectBucketAcl some_bucket fr-par/some-bucket/private@xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx * ``` */ export declare class ObjectBucketAcl extends pulumi.CustomResource { /** * Get an existing ObjectBucketAcl resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ObjectBucketAclState, opts?: pulumi.CustomResourceOptions): ObjectBucketAcl; /** * Returns true if the given object is an instance of ObjectBucketAcl. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ObjectBucketAcl; /** * A configuration block that sets the ACL permissions for an object per grantee documented below. */ readonly accessControlPolicy: pulumi.Output; /** * The canned ACL you want to apply to the bucket. Refer to the [AWS Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) documentation page to find a list of all the supported canned ACLs. */ readonly acl: pulumi.Output; /** * The bucket's name or regional ID. */ readonly bucket: pulumi.Output; /** * The project ID of the expected bucket owner. */ readonly expectedBucketOwner: pulumi.Output; /** * The projectId you want to attach the resource to */ readonly projectId: pulumi.Output; /** * The [region](https://www.scaleway.com/en/developers/api/#regions-and-zones) in which the bucket should be created. */ readonly region: pulumi.Output; /** * Create a ObjectBucketAcl resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ObjectBucketAclArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ObjectBucketAcl resources. */ export interface ObjectBucketAclState { /** * A configuration block that sets the ACL permissions for an object per grantee documented below. */ accessControlPolicy?: pulumi.Input; /** * The canned ACL you want to apply to the bucket. Refer to the [AWS Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) documentation page to find a list of all the supported canned ACLs. */ acl?: pulumi.Input; /** * The bucket's name or regional ID. */ bucket?: pulumi.Input; /** * The project ID of the expected bucket owner. */ expectedBucketOwner?: pulumi.Input; /** * The projectId you want to attach the resource to */ projectId?: pulumi.Input; /** * The [region](https://www.scaleway.com/en/developers/api/#regions-and-zones) in which the bucket should be created. */ region?: pulumi.Input; } /** * The set of arguments for constructing a ObjectBucketAcl resource. */ export interface ObjectBucketAclArgs { /** * A configuration block that sets the ACL permissions for an object per grantee documented below. */ accessControlPolicy?: pulumi.Input; /** * The canned ACL you want to apply to the bucket. Refer to the [AWS Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) documentation page to find a list of all the supported canned ACLs. */ acl?: pulumi.Input; /** * The bucket's name or regional ID. */ bucket: pulumi.Input; /** * The project ID of the expected bucket owner. */ expectedBucketOwner?: pulumi.Input; /** * The projectId you want to attach the resource to */ projectId?: pulumi.Input; /** * The [region](https://www.scaleway.com/en/developers/api/#regions-and-zones) in which the bucket should be created. */ region?: pulumi.Input; }