@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
114 lines • 4.3 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.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, { ...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?.arn;
resourceInputs["documentServiceEndpoint"] = state?.documentServiceEndpoint;
resourceInputs["domainId"] = state?.domainId;
resourceInputs["endpointOptions"] = state?.endpointOptions;
resourceInputs["indexFields"] = state?.indexFields;
resourceInputs["multiAz"] = state?.multiAz;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["scalingParameters"] = state?.scalingParameters;
resourceInputs["searchServiceEndpoint"] = state?.searchServiceEndpoint;
}
else {
const args = argsOrState;
resourceInputs["endpointOptions"] = args?.endpointOptions;
resourceInputs["indexFields"] = args?.indexFields;
resourceInputs["multiAz"] = args?.multiAz;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["scalingParameters"] = args?.scalingParameters;
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
;