UNPKG

@pulumi/aws

Version:

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

114 lines 4.63 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.Domain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an CloudSearch domain resource. * * The provider waits for the domain to become `Active` when applying a configuration. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudsearch.Domain("example", { * name: "example-domain", * scalingParameters: { * desiredInstanceType: "search.medium", * }, * indexFields: [ * { * name: "headline", * type: "text", * search: true, * "return": true, * sort: true, * highlight: false, * analysisScheme: "_en_default_", * }, * { * name: "price", * type: "double", * search: true, * facet: true, * "return": true, * sort: true, * sourceFields: "headline", * }, * ], * }); * ``` * * ## Import * * Using `pulumi import`, import CloudSearch Domains using the `name`. For example: * * ```sh * $ pulumi import aws:cloudsearch/domain:Domain example example-domain * ``` */ class Domain extends pulumi.CustomResource { /** * Get an existing Domain 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 Domain(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Domain. 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'] === Domain.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["documentServiceEndpoint"] = state ? state.documentServiceEndpoint : undefined; resourceInputs["domainId"] = state ? state.domainId : undefined; resourceInputs["endpointOptions"] = state ? state.endpointOptions : undefined; resourceInputs["indexFields"] = state ? state.indexFields : undefined; resourceInputs["multiAz"] = state ? state.multiAz : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["scalingParameters"] = state ? state.scalingParameters : undefined; resourceInputs["searchServiceEndpoint"] = state ? state.searchServiceEndpoint : undefined; } else { const args = argsOrState; resourceInputs["endpointOptions"] = args ? args.endpointOptions : undefined; resourceInputs["indexFields"] = args ? args.indexFields : undefined; resourceInputs["multiAz"] = args ? args.multiAz : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["scalingParameters"] = args ? args.scalingParameters : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["documentServiceEndpoint"] = undefined /*out*/; resourceInputs["domainId"] = undefined /*out*/; resourceInputs["searchServiceEndpoint"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Domain.__pulumiType, name, resourceInputs, opts); } } exports.Domain = Domain; /** @internal */ Domain.__pulumiType = 'aws:cloudsearch/domain:Domain'; //# sourceMappingURL=domain.js.map