@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
94 lines • 3.88 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bucket = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage an S3 Control Bucket.
*
* > This functionality is for managing [S3 on Outposts](https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html). To manage S3 Buckets in an AWS Partition, see the `aws.s3.Bucket` resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.s3control.Bucket("example", {
* bucket: "example",
* outpostId: exampleAwsOutpostsOutpost.id,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import S3 Control Buckets using Amazon Resource Name (ARN). For example:
*
* ```sh
* $ pulumi import aws:s3control/bucket:Bucket example arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-12345678/bucket/example
* ```
*/
class Bucket extends pulumi.CustomResource {
/**
* Get an existing Bucket 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, id, state, opts) {
return new Bucket(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Bucket. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Bucket.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["bucket"] = state?.bucket;
resourceInputs["creationDate"] = state?.creationDate;
resourceInputs["outpostId"] = state?.outpostId;
resourceInputs["publicAccessBlockEnabled"] = state?.publicAccessBlockEnabled;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.bucket === undefined && !opts.urn) {
throw new Error("Missing required property 'bucket'");
}
if (args?.outpostId === undefined && !opts.urn) {
throw new Error("Missing required property 'outpostId'");
}
resourceInputs["bucket"] = args?.bucket;
resourceInputs["outpostId"] = args?.outpostId;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["creationDate"] = undefined /*out*/;
resourceInputs["publicAccessBlockEnabled"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Bucket.__pulumiType, name, resourceInputs, opts);
}
}
exports.Bucket = Bucket;
/** @internal */
Bucket.__pulumiType = 'aws:s3control/bucket:Bucket';
//# sourceMappingURL=bucket.js.map
;