@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
96 lines • 3.94 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.PlaceIndex = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Location Service Place Index.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.location.PlaceIndex("example", {
* dataSource: "Here",
* indexName: "example",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_location_place_index` resources using the place index name. For example:
*
* ```sh
* $ pulumi import aws:location/placeIndex:PlaceIndex example example
* ```
*/
class PlaceIndex extends pulumi.CustomResource {
/**
* Get an existing PlaceIndex 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 PlaceIndex(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of PlaceIndex. 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'] === PlaceIndex.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["dataSource"] = state?.dataSource;
resourceInputs["dataSourceConfiguration"] = state?.dataSourceConfiguration;
resourceInputs["description"] = state?.description;
resourceInputs["indexArn"] = state?.indexArn;
resourceInputs["indexName"] = state?.indexName;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["updateTime"] = state?.updateTime;
}
else {
const args = argsOrState;
if (args?.dataSource === undefined && !opts.urn) {
throw new Error("Missing required property 'dataSource'");
}
if (args?.indexName === undefined && !opts.urn) {
throw new Error("Missing required property 'indexName'");
}
resourceInputs["dataSource"] = args?.dataSource;
resourceInputs["dataSourceConfiguration"] = args?.dataSourceConfiguration;
resourceInputs["description"] = args?.description;
resourceInputs["indexName"] = args?.indexName;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["indexArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PlaceIndex.__pulumiType, name, resourceInputs, opts);
}
}
exports.PlaceIndex = PlaceIndex;
/** @internal */
PlaceIndex.__pulumiType = 'aws:location/placeIndex:PlaceIndex';
//# sourceMappingURL=placeIndex.js.map