@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
110 lines • 5.16 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.ServerlessCollection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS OpenSearch Serverless Collection.
*
* > **NOTE:** An `aws.opensearch.ServerlessCollection` cannot be created without having an applicable encryption security policy. Use the `dependsOn` meta-argument to define this dependency.
*
* > **NOTE:** An `aws.opensearch.ServerlessCollection` is not accessible without configuring an applicable network security policy. Data cannot be accessed without configuring an applicable data access policy.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.opensearch.ServerlessSecurityPolicy("example", {
* name: "example",
* type: "encryption",
* policy: JSON.stringify({
* Rules: [{
* Resource: ["collection/example"],
* ResourceType: "collection",
* }],
* AWSOwnedKey: true,
* }),
* });
* const exampleServerlessCollection = new aws.opensearch.ServerlessCollection("example", {name: "example"}, {
* dependsOn: [example],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import OpenSearchServerless Collection using the `id`. For example:
*
* ```sh
* $ pulumi import aws:opensearch/serverlessCollection:ServerlessCollection example example
* ```
*/
class ServerlessCollection extends pulumi.CustomResource {
/**
* Get an existing ServerlessCollection 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 ServerlessCollection(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServerlessCollection. 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'] === ServerlessCollection.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["collectionEndpoint"] = state ? state.collectionEndpoint : undefined;
resourceInputs["dashboardEndpoint"] = state ? state.dashboardEndpoint : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["kmsKeyArn"] = state ? state.kmsKeyArn : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["standbyReplicas"] = state ? state.standbyReplicas : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
resourceInputs["type"] = state ? state.type : undefined;
}
else {
const args = argsOrState;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["standbyReplicas"] = args ? args.standbyReplicas : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["collectionEndpoint"] = undefined /*out*/;
resourceInputs["dashboardEndpoint"] = undefined /*out*/;
resourceInputs["kmsKeyArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServerlessCollection.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServerlessCollection = ServerlessCollection;
/** @internal */
ServerlessCollection.__pulumiType = 'aws:opensearch/serverlessCollection:ServerlessCollection';
//# sourceMappingURL=serverlessCollection.js.map