UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

110 lines 4.78 kB
"use strict"; // *** 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, { ...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?.arn; resourceInputs["collectionEndpoint"] = state?.collectionEndpoint; resourceInputs["dashboardEndpoint"] = state?.dashboardEndpoint; resourceInputs["description"] = state?.description; resourceInputs["kmsKeyArn"] = state?.kmsKeyArn; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["standbyReplicas"] = state?.standbyReplicas; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["type"] = state?.type; } else { const args = argsOrState; resourceInputs["description"] = args?.description; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["standbyReplicas"] = args?.standbyReplicas; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["type"] = args?.type; 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