1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. discoveryengine
  5. Sitemap
Google Cloud v8.27.1 published on Friday, Apr 25, 2025 by Pulumi

gcp.discoveryengine.Sitemap

Explore with Pulumi AI

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:

Example Usage

Discoveryengine Sitemap Basic

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",
});
Copy
import pulumi
import pulumi_gcp as gcp

advanced = gcp.discoveryengine.DataStore("advanced",
    location="global",
    data_store_id="data-store-id",
    display_name="tf-test-advanced-site-search-datastore",
    industry_vertical="GENERIC",
    content_config="PUBLIC_WEBSITE",
    solution_types=["SOLUTION_TYPE_SEARCH"],
    create_advanced_site_search=True,
    skip_default_schema_creation=False)
basic = gcp.discoveryengine.Sitemap("basic",
    location=advanced.location,
    data_store_id=advanced.data_store_id,
    uri="https://www.test.com/sitemap.xml")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/discoveryengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		advanced, err := discoveryengine.NewDataStore(ctx, "advanced", &discoveryengine.DataStoreArgs{
			Location:         pulumi.String("global"),
			DataStoreId:      pulumi.String("data-store-id"),
			DisplayName:      pulumi.String("tf-test-advanced-site-search-datastore"),
			IndustryVertical: pulumi.String("GENERIC"),
			ContentConfig:    pulumi.String("PUBLIC_WEBSITE"),
			SolutionTypes: pulumi.StringArray{
				pulumi.String("SOLUTION_TYPE_SEARCH"),
			},
			CreateAdvancedSiteSearch:  pulumi.Bool(true),
			SkipDefaultSchemaCreation: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		_, err = discoveryengine.NewSitemap(ctx, "basic", &discoveryengine.SitemapArgs{
			Location:    advanced.Location,
			DataStoreId: advanced.DataStoreId,
			Uri:         pulumi.String("https://www.test.com/sitemap.xml"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var advanced = new Gcp.DiscoveryEngine.DataStore("advanced", new()
    {
        Location = "global",
        DataStoreId = "data-store-id",
        DisplayName = "tf-test-advanced-site-search-datastore",
        IndustryVertical = "GENERIC",
        ContentConfig = "PUBLIC_WEBSITE",
        SolutionTypes = new[]
        {
            "SOLUTION_TYPE_SEARCH",
        },
        CreateAdvancedSiteSearch = true,
        SkipDefaultSchemaCreation = false,
    });

    var basic = new Gcp.DiscoveryEngine.Sitemap("basic", new()
    {
        Location = advanced.Location,
        DataStoreId = advanced.DataStoreId,
        Uri = "https://www.test.com/sitemap.xml",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.discoveryengine.DataStore;
import com.pulumi.gcp.discoveryengine.DataStoreArgs;
import com.pulumi.gcp.discoveryengine.Sitemap;
import com.pulumi.gcp.discoveryengine.SitemapArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var advanced = new DataStore("advanced", DataStoreArgs.builder()
            .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)
            .build());

        var basic = new Sitemap("basic", SitemapArgs.builder()
            .location(advanced.location())
            .dataStoreId(advanced.dataStoreId())
            .uri("https://www.test.com/sitemap.xml")
            .build());

    }
}
Copy
resources:
  basic:
    type: gcp:discoveryengine:Sitemap
    properties:
      location: ${advanced.location}
      dataStoreId: ${advanced.dataStoreId}
      uri: https://www.test.com/sitemap.xml
  advanced:
    type: gcp:discoveryengine:DataStore
    properties:
      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
Copy

Create Sitemap Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Sitemap(name: string, args: SitemapArgs, opts?: CustomResourceOptions);
@overload
def Sitemap(resource_name: str,
            args: SitemapArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Sitemap(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            data_store_id: Optional[str] = None,
            location: Optional[str] = None,
            project: Optional[str] = None,
            uri: Optional[str] = None)
func NewSitemap(ctx *Context, name string, args SitemapArgs, opts ...ResourceOption) (*Sitemap, error)
public Sitemap(string name, SitemapArgs args, CustomResourceOptions? opts = null)
public Sitemap(String name, SitemapArgs args)
public Sitemap(String name, SitemapArgs args, CustomResourceOptions options)
type: gcp:discoveryengine:Sitemap
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SitemapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SitemapArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SitemapArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SitemapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SitemapArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var sitemapResource = new Gcp.DiscoveryEngine.Sitemap("sitemapResource", new()
{
    DataStoreId = "string",
    Location = "string",
    Project = "string",
    Uri = "string",
});
Copy
example, err := discoveryengine.NewSitemap(ctx, "sitemapResource", &discoveryengine.SitemapArgs{
	DataStoreId: pulumi.String("string"),
	Location:    pulumi.String("string"),
	Project:     pulumi.String("string"),
	Uri:         pulumi.String("string"),
})
Copy
var sitemapResource = new Sitemap("sitemapResource", SitemapArgs.builder()
    .dataStoreId("string")
    .location("string")
    .project("string")
    .uri("string")
    .build());
Copy
sitemap_resource = gcp.discoveryengine.Sitemap("sitemapResource",
    data_store_id="string",
    location="string",
    project="string",
    uri="string")
Copy
const sitemapResource = new gcp.discoveryengine.Sitemap("sitemapResource", {
    dataStoreId: "string",
    location: "string",
    project: "string",
    uri: "string",
});
Copy
type: gcp:discoveryengine:Sitemap
properties:
    dataStoreId: string
    location: string
    project: string
    uri: string
Copy

Sitemap Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Sitemap resource accepts the following input properties:

DataStoreId
This property is required.
Changes to this property will trigger replacement.
string
The unique id of the data store.


Location
This property is required.
Changes to this property will trigger replacement.
string
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Uri Changes to this property will trigger replacement. string
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
DataStoreId
This property is required.
Changes to this property will trigger replacement.
string
The unique id of the data store.


Location
This property is required.
Changes to this property will trigger replacement.
string
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Uri Changes to this property will trigger replacement. string
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
dataStoreId
This property is required.
Changes to this property will trigger replacement.
String
The unique id of the data store.


location
This property is required.
Changes to this property will trigger replacement.
String
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
uri Changes to this property will trigger replacement. String
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
dataStoreId
This property is required.
Changes to this property will trigger replacement.
string
The unique id of the data store.


location
This property is required.
Changes to this property will trigger replacement.
string
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
uri Changes to this property will trigger replacement. string
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
data_store_id
This property is required.
Changes to this property will trigger replacement.
str
The unique id of the data store.


location
This property is required.
Changes to this property will trigger replacement.
str
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
uri Changes to this property will trigger replacement. str
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
dataStoreId
This property is required.
Changes to this property will trigger replacement.
String
The unique id of the data store.


location
This property is required.
Changes to this property will trigger replacement.
String
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
uri Changes to this property will trigger replacement. String
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".

Outputs

All input properties are implicitly available as output properties. Additionally, the Sitemap resource produces the following output properties:

CreateTime string
Timestamp when the sitemap was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
SitemapId string
The unique id of the sitemap.
CreateTime string
Timestamp when the sitemap was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
SitemapId string
The unique id of the sitemap.
createTime String
Timestamp when the sitemap was created.
id String
The provider-assigned unique ID for this managed resource.
name String
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
sitemapId String
The unique id of the sitemap.
createTime string
Timestamp when the sitemap was created.
id string
The provider-assigned unique ID for this managed resource.
name string
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
sitemapId string
The unique id of the sitemap.
create_time str
Timestamp when the sitemap was created.
id str
The provider-assigned unique ID for this managed resource.
name str
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
sitemap_id str
The unique id of the sitemap.
createTime String
Timestamp when the sitemap was created.
id String
The provider-assigned unique ID for this managed resource.
name String
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
sitemapId String
The unique id of the sitemap.

Look up Existing Sitemap Resource

Get an existing Sitemap resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SitemapState, opts?: CustomResourceOptions): Sitemap
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        data_store_id: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        sitemap_id: Optional[str] = None,
        uri: Optional[str] = None) -> Sitemap
func GetSitemap(ctx *Context, name string, id IDInput, state *SitemapState, opts ...ResourceOption) (*Sitemap, error)
public static Sitemap Get(string name, Input<string> id, SitemapState? state, CustomResourceOptions? opts = null)
public static Sitemap get(String name, Output<String> id, SitemapState state, CustomResourceOptions options)
resources:  _:    type: gcp:discoveryengine:Sitemap    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime string
Timestamp when the sitemap was created.
DataStoreId Changes to this property will trigger replacement. string
The unique id of the data store.


Location Changes to this property will trigger replacement. string
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
Name string
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SitemapId string
The unique id of the sitemap.
Uri Changes to this property will trigger replacement. string
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
CreateTime string
Timestamp when the sitemap was created.
DataStoreId Changes to this property will trigger replacement. string
The unique id of the data store.


Location Changes to this property will trigger replacement. string
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
Name string
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SitemapId string
The unique id of the sitemap.
Uri Changes to this property will trigger replacement. string
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
createTime String
Timestamp when the sitemap was created.
dataStoreId Changes to this property will trigger replacement. String
The unique id of the data store.


location Changes to this property will trigger replacement. String
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
name String
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
sitemapId String
The unique id of the sitemap.
uri Changes to this property will trigger replacement. String
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
createTime string
Timestamp when the sitemap was created.
dataStoreId Changes to this property will trigger replacement. string
The unique id of the data store.


location Changes to this property will trigger replacement. string
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
name string
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
sitemapId string
The unique id of the sitemap.
uri Changes to this property will trigger replacement. string
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
create_time str
Timestamp when the sitemap was created.
data_store_id Changes to this property will trigger replacement. str
The unique id of the data store.


location Changes to this property will trigger replacement. str
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
name str
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
sitemap_id str
The unique id of the sitemap.
uri Changes to this property will trigger replacement. str
Public URI for the sitemap, e.g. "www.example.com/sitemap.xml".
createTime String
Timestamp when the sitemap was created.
dataStoreId Changes to this property will trigger replacement. String
The unique id of the data store.


location Changes to this property will trigger replacement. String
The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
name String
The unique full resource name of the sitemap. Values are of the format projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/sitemaps/{sitemap_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
sitemapId String
The unique id of the sitemap.
uri Changes to this property will trigger replacement. String
Public URI for the sitemap, e.g. "www.example.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:

$ pulumi import gcp:discoveryengine/sitemap:Sitemap default {{name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.