UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

140 lines 5.13 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a bucket logging resource for Spaces, DigitalOcean's object storage product. * The `digitalocean.SpacesBucketLogging` resource allows Terraform to configure access * logging for Spaces buckets. For more information, see: * [How to Configure Spaces Access Logs](https://docs.digitalocean.com/products/spaces/how-to/access-logs/) * * The [Spaces API](https://docs.digitalocean.com/reference/api/spaces-api/) was * designed to be interoperable with Amazon's AWS S3 API. This allows users to * interact with the service while using the tools they already know. Spaces * mirrors S3's authentication framework and requests to Spaces require a key pair * similar to Amazon's Access ID and Secret Key. * * The authentication requirement can be met by either setting the * `SPACES_ACCESS_KEY_ID` and `SPACES_SECRET_ACCESS_KEY` environment variables or * the provider's `spacesAccessId` and `spacesSecretKey` arguments to the * access ID and secret you generate via the DigitalOcean control panel. For * example: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const static_assets = new digitalocean.SpacesBucket("static-assets", {}); * ``` * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const assets = new digitalocean.SpacesBucket("assets", { * name: "assets", * region: digitalocean.Region.NYC3, * }); * const logs = new digitalocean.SpacesBucket("logs", { * name: "logs", * region: digitalocean.Region.NYC3, * }); * const example = new digitalocean.SpacesBucketLogging("example", { * region: "%s", * bucket: assets.id, * targetBucket: logs.id, * targetPrefix: "access-logs/", * }); * ``` * * ## Import * * Spaces bucket logging can be imported using the `region` and `bucket` attributes (delimited by a comma): * * ```sh * $ pulumi import digitalocean:index/spacesBucketLogging:SpacesBucketLogging example `region`,`bucket` * ``` */ export declare class SpacesBucketLogging extends pulumi.CustomResource { /** * Get an existing SpacesBucketLogging 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?: SpacesBucketLoggingState, opts?: pulumi.CustomResourceOptions): SpacesBucketLogging; /** * Returns true if the given object is an instance of SpacesBucketLogging. 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 SpacesBucketLogging; /** * The name of the bucket which will be logged. */ readonly bucket: pulumi.Output<string>; /** * The region where the bucket resides. */ readonly region: pulumi.Output<string>; /** * The name of the bucket which will store the logs. */ readonly targetBucket: pulumi.Output<string>; /** * The prefix for the log files. */ readonly targetPrefix: pulumi.Output<string>; /** * Create a SpacesBucketLogging 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: SpacesBucketLoggingArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SpacesBucketLogging resources. */ export interface SpacesBucketLoggingState { /** * The name of the bucket which will be logged. */ bucket?: pulumi.Input<string | undefined>; /** * The region where the bucket resides. */ region?: pulumi.Input<string | undefined>; /** * The name of the bucket which will store the logs. */ targetBucket?: pulumi.Input<string | undefined>; /** * The prefix for the log files. */ targetPrefix?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a SpacesBucketLogging resource. */ export interface SpacesBucketLoggingArgs { /** * The name of the bucket which will be logged. */ bucket: pulumi.Input<string>; /** * The region where the bucket resides. */ region: pulumi.Input<string>; /** * The name of the bucket which will store the logs. */ targetBucket: pulumi.Input<string>; /** * The prefix for the log files. */ targetPrefix: pulumi.Input<string>; } //# sourceMappingURL=spacesBucketLogging.d.ts.map