@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
112 lines • 4.4 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.Sitemap = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Sitemap is a file where you provide information about the pages, videos, and
* other files on your site, and the relationships between them.
*
* To get more information about Sitemap, see:
*
* * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores.siteSearchEngine.sitemaps)
*
* ## Example Usage
*
* ### Discoveryengine Sitemap Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const advanced = new gcp.discoveryengine.DataStore("advanced", {
* location: "global",
* dataStoreId: "data-store-id",
* displayName: "tf-test-advanced-site-search-datastore",
* industryVertical: "GENERIC",
* contentConfig: "PUBLIC_WEBSITE",
* solutionTypes: ["SOLUTION_TYPE_SEARCH"],
* createAdvancedSiteSearch: true,
* skipDefaultSchemaCreation: false,
* });
* const basic = new gcp.discoveryengine.Sitemap("basic", {
* location: advanced.location,
* dataStoreId: advanced.dataStoreId,
* uri: "https://www.test.com/sitemap.xml",
* });
* ```
*
* ## Import
*
* Sitemap can be imported using any of these accepted formats:
*
* * `{{name}}`
*
* When using the `pulumi import` command, Sitemap can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:discoveryengine/sitemap:Sitemap default {{name}}
* ```
*/
class Sitemap extends pulumi.CustomResource {
/**
* Get an existing Sitemap 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 Sitemap(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Sitemap. 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'] === Sitemap.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["dataStoreId"] = state?.dataStoreId;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["project"] = state?.project;
resourceInputs["sitemapId"] = state?.sitemapId;
resourceInputs["uri"] = state?.uri;
}
else {
const args = argsOrState;
if (args?.dataStoreId === undefined && !opts.urn) {
throw new Error("Missing required property 'dataStoreId'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["dataStoreId"] = args?.dataStoreId;
resourceInputs["location"] = args?.location;
resourceInputs["project"] = args?.project;
resourceInputs["uri"] = args?.uri;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["sitemapId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Sitemap.__pulumiType, name, resourceInputs, opts);
}
}
exports.Sitemap = Sitemap;
/** @internal */
Sitemap.__pulumiType = 'gcp:discoveryengine/sitemap:Sitemap';
//# sourceMappingURL=sitemap.js.map
;