UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

102 lines 4.16 kB
import * as pulumi from "@pulumi/pulumi"; /** * The `scaleway.object.BucketPolicy` data source is used to retrieve information about the bucket policy of an Object Storage bucket. * * Refer to the Object Storage [documentation](https://www.scaleway.com/en/docs/object-storage/api-cli/bucket-policy/) for more information. * * ## Retrieve the bucket policy of a bucket * * The following command allows you to retrieve a bucket policy by its bucket. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.object.getBucketPolicy({ * bucket: "bucket.test.com", * }); * ``` */ export declare function getBucketPolicy(args: GetBucketPolicyArgs, opts?: pulumi.InvokeOptions): Promise<GetBucketPolicyResult>; /** * A collection of arguments for invoking getBucketPolicy. */ export interface GetBucketPolicyArgs { /** * The name of the bucket. */ bucket: string; /** * `projectId`) The ID of the project with which the bucket is associated. * * > **Important:** The `projectId` 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 `projectId` for every child resource of the bucket, * like bucket policies. Otherwise, Terraform will try to create the child resource with the default project ID and you will get a 403 error. * * For more information on Object Storage and Scaleway Projects, refer to the [dedicated documentation](https://www.scaleway.com/en/docs/iam/api-cli/using-api-key-object-storage/). */ projectId?: string; /** * `region`) The region in which the Object Storage exists. */ region?: string; } /** * A collection of values returned by getBucketPolicy. */ export interface GetBucketPolicyResult { readonly bucket: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The content of the bucket policy in JSON format. */ readonly policy: string; readonly projectId?: string; readonly region?: string; } /** * The `scaleway.object.BucketPolicy` data source is used to retrieve information about the bucket policy of an Object Storage bucket. * * Refer to the Object Storage [documentation](https://www.scaleway.com/en/docs/object-storage/api-cli/bucket-policy/) for more information. * * ## Retrieve the bucket policy of a bucket * * The following command allows you to retrieve a bucket policy by its bucket. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.object.getBucketPolicy({ * bucket: "bucket.test.com", * }); * ``` */ export declare function getBucketPolicyOutput(args: GetBucketPolicyOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetBucketPolicyResult>; /** * A collection of arguments for invoking getBucketPolicy. */ export interface GetBucketPolicyOutputArgs { /** * The name of the bucket. */ bucket: pulumi.Input<string>; /** * `projectId`) The ID of the project with which the bucket is associated. * * > **Important:** The `projectId` 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 `projectId` for every child resource of the bucket, * like bucket policies. Otherwise, Terraform will try to create the child resource with the default project ID and you will get a 403 error. * * For more information on Object Storage and Scaleway Projects, refer to the [dedicated documentation](https://www.scaleway.com/en/docs/iam/api-cli/using-api-key-object-storage/). */ projectId?: pulumi.Input<string | undefined>; /** * `region`) The region in which the Object Storage exists. */ region?: pulumi.Input<string | undefined>; } //# sourceMappingURL=getBucketPolicy.d.ts.map