@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
91 lines • 3.73 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.Namespace = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an Amazon S3 Tables Namespace.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const exampleTableBucket = new aws.s3tables.TableBucket("example", {name: "example-bucket"});
* const example = new aws.s3tables.Namespace("example", {
* namespace: "example_namespace",
* tableBucketArn: exampleTableBucket.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import S3 Tables Namespace using the `table_bucket_arn` and the value of `namespace`, separated by a semicolon (`;`). For example:
*
* ```sh
* $ pulumi import aws:s3tables/namespace:Namespace example 'arn:aws:s3tables:us-west-2:123456789012:bucket/example-bucket;example-namespace'
* ```
*/
class Namespace extends pulumi.CustomResource {
/**
* Get an existing Namespace 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 Namespace(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Namespace. 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'] === Namespace.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["createdBy"] = state?.createdBy;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["ownerAccountId"] = state?.ownerAccountId;
resourceInputs["region"] = state?.region;
resourceInputs["tableBucketArn"] = state?.tableBucketArn;
}
else {
const args = argsOrState;
if (args?.namespace === undefined && !opts.urn) {
throw new Error("Missing required property 'namespace'");
}
if (args?.tableBucketArn === undefined && !opts.urn) {
throw new Error("Missing required property 'tableBucketArn'");
}
resourceInputs["namespace"] = args?.namespace;
resourceInputs["region"] = args?.region;
resourceInputs["tableBucketArn"] = args?.tableBucketArn;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["createdBy"] = undefined /*out*/;
resourceInputs["ownerAccountId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Namespace.__pulumiType, name, resourceInputs, opts);
}
}
exports.Namespace = Namespace;
/** @internal */
Namespace.__pulumiType = 'aws:s3tables/namespace:Namespace';
//# sourceMappingURL=namespace.js.map