import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
 * Provides a CORS configuration resource for Spaces, DigitalOcean's object storage product.
 * The `digitalocean.SpacesBucketCorsConfiguration` resource allows Terraform to to attach CORS configuration to Spaces.
 *
 * 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", {});
 * ```
 *
 * For more information, See [An Introduction to DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces)
 *
 * ## Example Usage
 *
 * ### Create a Key in a Spaces Bucket
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as digitalocean from "@pulumi/digitalocean";
 *
 * const foobar = new digitalocean.SpacesBucket("foobar", {
 *     name: "foobar",
 *     region: digitalocean.Region.NYC3,
 * });
 * const test = new digitalocean.SpacesBucketCorsConfiguration("test", {
 *     bucket: foobar.id,
 *     region: "nyc3",
 *     corsRules: [{
 *         allowedHeaders: ["*"],
 *         allowedMethods: [
 *             "PUT",
 *             "POST",
 *         ],
 *         allowedOrigins: ["https://s3-website-test.hashicorp.com"],
 *         exposeHeaders: ["ETag"],
 *         maxAgeSeconds: 3000,
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * Bucket policies can be imported using the `region` and `bucket` attributes (delimited by a comma):
 *
 * ```sh
 * $ pulumi import digitalocean:index/spacesBucketCorsConfiguration:SpacesBucketCorsConfiguration foobar `region`,`bucket`
 * ```
 */
export declare class SpacesBucketCorsConfiguration extends pulumi.CustomResource {
    /**
     * Get an existing SpacesBucketCorsConfiguration 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?: SpacesBucketCorsConfigurationState, opts?: pulumi.CustomResourceOptions): SpacesBucketCorsConfiguration;
    /**
     * Returns true if the given object is an instance of SpacesBucketCorsConfiguration.  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 SpacesBucketCorsConfiguration;
    /**
     * The name of the bucket to which to apply the CORS configuration.
     */
    readonly bucket: pulumi.Output<string>;
    /**
     * Set of origins and methods (cross-origin access that you want to allow). See below. You can configure up to 100 rules.
     */
    readonly corsRules: pulumi.Output<outputs.SpacesBucketCorsConfigurationCorsRule[]>;
    /**
     * The region where the bucket resides.
     */
    readonly region: pulumi.Output<string>;
    /**
     * Create a SpacesBucketCorsConfiguration 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: SpacesBucketCorsConfigurationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering SpacesBucketCorsConfiguration resources.
 */
export interface SpacesBucketCorsConfigurationState {
    /**
     * The name of the bucket to which to apply the CORS configuration.
     */
    bucket?: pulumi.Input<string | undefined>;
    /**
     * Set of origins and methods (cross-origin access that you want to allow). See below. You can configure up to 100 rules.
     */
    corsRules?: pulumi.Input<pulumi.Input<inputs.SpacesBucketCorsConfigurationCorsRule>[] | undefined>;
    /**
     * The region where the bucket resides.
     */
    region?: pulumi.Input<string | undefined>;
}
/**
 * The set of arguments for constructing a SpacesBucketCorsConfiguration resource.
 */
export interface SpacesBucketCorsConfigurationArgs {
    /**
     * The name of the bucket to which to apply the CORS configuration.
     */
    bucket: pulumi.Input<string>;
    /**
     * Set of origins and methods (cross-origin access that you want to allow). See below. You can configure up to 100 rules.
     */
    corsRules: pulumi.Input<pulumi.Input<inputs.SpacesBucketCorsConfigurationCorsRule>[]>;
    /**
     * The region where the bucket resides.
     */
    region: pulumi.Input<string>;
}
//# sourceMappingURL=spacesBucketCorsConfiguration.d.ts.map