UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

207 lines (206 loc) 7.29 kB
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 "@lbrlabs/pulumi-scaleway"; * * const someBucket = new scaleway.ObjectBucket("someBucket", {}); * const main = new scaleway.ObjectBucketAcl("main", { * bucket: scaleway_object_bucket.main.name, * acl: "private", * }); * ``` * ## Example with Grants * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const mainObjectBucket = new scaleway.ObjectBucket("mainObjectBucket", {}); * const mainObjectBucketAcl = new scaleway.ObjectBucketAcl("mainObjectBucketAcl", { * bucket: mainObjectBucket.name, * accessControlPolicy: { * grants: [ * { * grantee: { * id: "<project-id>:<project-id>", * type: "CanonicalUser", * }, * permission: "FULL_CONTROL", * }, * { * grantee: { * id: "<project-id>", * type: "CanonicalUser", * }, * permission: "WRITE", * }, * ], * owner: { * id: "<project-id>", * }, * }, * }); * ``` * * ## The ACL * * Please check the [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) * * ## 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 * * Buckets can be imported using the `{region}/{bucketName}/{acl}` identifier, e.g. bash * * ```sh * $ pulumi import scaleway:index/objectBucketAcl:ObjectBucketAcl some_bucket fr-par/some-bucket * ``` * * /private */ 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<pulumi.ID>, 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<outputs.ObjectBucketAclAccessControlPolicy>; /** * The canned ACL you want to apply to the bucket. */ readonly acl: pulumi.Output<string | undefined>; /** * The name of the bucket. */ readonly bucket: pulumi.Output<string>; /** * The project ID of the expected bucket owner. */ readonly expectedBucketOwner: pulumi.Output<string | undefined>; /** * `projectId`) The ID of the project the bucket is associated with. */ readonly projectId: pulumi.Output<string>; /** * The [region](https://developers.scaleway.com/en/quickstart/#region-definition) in which the bucket should be created. */ readonly region: pulumi.Output<string>; /** * 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<inputs.ObjectBucketAclAccessControlPolicy>; /** * The canned ACL you want to apply to the bucket. */ acl?: pulumi.Input<string>; /** * The name of the bucket. */ bucket?: pulumi.Input<string>; /** * The project ID of the expected bucket owner. */ expectedBucketOwner?: pulumi.Input<string>; /** * `projectId`) The ID of the project the bucket is associated with. */ projectId?: pulumi.Input<string>; /** * The [region](https://developers.scaleway.com/en/quickstart/#region-definition) in which the bucket should be created. */ region?: pulumi.Input<string>; } /** * 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<inputs.ObjectBucketAclAccessControlPolicy>; /** * The canned ACL you want to apply to the bucket. */ acl?: pulumi.Input<string>; /** * The name of the bucket. */ bucket: pulumi.Input<string>; /** * The project ID of the expected bucket owner. */ expectedBucketOwner?: pulumi.Input<string>; /** * `projectId`) The ID of the project the bucket is associated with. */ projectId?: pulumi.Input<string>; /** * The [region](https://developers.scaleway.com/en/quickstart/#region-definition) in which the bucket should be created. */ region?: pulumi.Input<string>; }