@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
304 lines (303 loc) • 11.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* TargetSite represents a URI pattern that the users want to confine their
* search.
*
* To get more information about TargetSite, see:
*
* * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores.siteSearchEngine.targetSites)
*
* ## Example Usage
*
* ### Discoveryengine Targetsite Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basicDataStore = new gcp.discoveryengine.DataStore("basic", {
* location: "global",
* dataStoreId: "data-store-id",
* displayName: "tf-test-basic-site-search-datastore",
* industryVertical: "GENERIC",
* contentConfig: "PUBLIC_WEBSITE",
* solutionTypes: ["SOLUTION_TYPE_SEARCH"],
* createAdvancedSiteSearch: false,
* skipDefaultSchemaCreation: false,
* });
* const basic = new gcp.discoveryengine.TargetSite("basic", {
* location: basicDataStore.location,
* dataStoreId: basicDataStore.dataStoreId,
* providedUriPattern: "cloud.google.com/docs/*",
* type: "INCLUDE",
* exactMatch: false,
* });
* ```
* ### Discoveryengine Targetsite Advanced
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const advancedDataStore = 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 advanced = new gcp.discoveryengine.TargetSite("advanced", {
* location: advancedDataStore.location,
* dataStoreId: advancedDataStore.dataStoreId,
* providedUriPattern: "cloud.google.com/docs/*",
* type: "INCLUDE",
* exactMatch: false,
* });
* ```
*
* ## Import
*
* TargetSite can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}/siteSearchEngine/targetSites/{{target_site_id}}`
*
* * `{{project}}/{{location}}/{{data_store_id}}/{{target_site_id}}`
*
* * `{{location}}/{{data_store_id}}/{{target_site_id}}`
*
* When using the `pulumi import` command, TargetSite can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:discoveryengine/targetSite:TargetSite default projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}/siteSearchEngine/targetSites/{{target_site_id}}
* ```
*
* ```sh
* $ pulumi import gcp:discoveryengine/targetSite:TargetSite default {{project}}/{{location}}/{{data_store_id}}/{{target_site_id}}
* ```
*
* ```sh
* $ pulumi import gcp:discoveryengine/targetSite:TargetSite default {{location}}/{{data_store_id}}/{{target_site_id}}
* ```
*/
export declare class TargetSite extends pulumi.CustomResource {
/**
* Get an existing TargetSite 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: string, id: pulumi.Input<pulumi.ID>, state?: TargetSiteState, opts?: pulumi.CustomResourceOptions): TargetSite;
/**
* Returns true if the given object is an instance of TargetSite. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is TargetSite;
/**
* The unique id of the data store.
*
*
* - - -
*/
readonly dataStoreId: pulumi.Output<string>;
/**
* If set to false, a uriPattern is generated to include all pages whose
* address contains the provided_uri_pattern. If set to true, an uriPattern
* is generated to try to be an exact match of the providedUriPattern or
* just the specific page if the providedUriPattern is a specific one.
* providedUriPattern is always normalized to generate the URI pattern to
* be used by the search engine.
*/
readonly exactMatch: pulumi.Output<boolean | undefined>;
/**
* Site search indexing failure reasons.
* Structure is documented below.
*/
readonly failureReasons: pulumi.Output<outputs.discoveryengine.TargetSiteFailureReason[]>;
/**
* This is system-generated based on the `providedUriPattern`.
*/
readonly generatedUriPattern: pulumi.Output<string>;
/**
* The indexing status.
*/
readonly indexingStatus: pulumi.Output<string>;
/**
* The geographic location where the data store should reside. The value can
* only be one of "global", "us" and "eu".
*/
readonly location: pulumi.Output<string>;
/**
* The unique full resource name of the target site. Values are of the format
* `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/targetSites/{target_site_id}`.
* This field must be a UTF-8 encoded string with a length limit of 1024
* characters.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The user provided URI pattern from which the `generatedUriPattern` is
* generated.
*/
readonly providedUriPattern: pulumi.Output<string>;
/**
* Root domain of the `providedUriPattern`.
*/
readonly rootDomainUri: pulumi.Output<string>;
/**
* Site ownership and validity verification status.
* Structure is documented below.
*/
readonly siteVerificationInfos: pulumi.Output<outputs.discoveryengine.TargetSiteSiteVerificationInfo[]>;
/**
* The unique id of the target site.
*/
readonly targetSiteId: pulumi.Output<string>;
/**
* The possible target site types.
* Possible values are: `INCLUDE`, `EXCLUDE`.
*/
readonly type: pulumi.Output<string | undefined>;
/**
* The target site's last updated time.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a TargetSite resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: TargetSiteArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering TargetSite resources.
*/
export interface TargetSiteState {
/**
* The unique id of the data store.
*
*
* - - -
*/
dataStoreId?: pulumi.Input<string>;
/**
* If set to false, a uriPattern is generated to include all pages whose
* address contains the provided_uri_pattern. If set to true, an uriPattern
* is generated to try to be an exact match of the providedUriPattern or
* just the specific page if the providedUriPattern is a specific one.
* providedUriPattern is always normalized to generate the URI pattern to
* be used by the search engine.
*/
exactMatch?: pulumi.Input<boolean>;
/**
* Site search indexing failure reasons.
* Structure is documented below.
*/
failureReasons?: pulumi.Input<pulumi.Input<inputs.discoveryengine.TargetSiteFailureReason>[]>;
/**
* This is system-generated based on the `providedUriPattern`.
*/
generatedUriPattern?: pulumi.Input<string>;
/**
* The indexing status.
*/
indexingStatus?: pulumi.Input<string>;
/**
* The geographic location where the data store should reside. The value can
* only be one of "global", "us" and "eu".
*/
location?: pulumi.Input<string>;
/**
* The unique full resource name of the target site. Values are of the format
* `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/siteSearchEngine/targetSites/{target_site_id}`.
* This field must be a UTF-8 encoded string with a length limit of 1024
* characters.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The user provided URI pattern from which the `generatedUriPattern` is
* generated.
*/
providedUriPattern?: pulumi.Input<string>;
/**
* Root domain of the `providedUriPattern`.
*/
rootDomainUri?: pulumi.Input<string>;
/**
* Site ownership and validity verification status.
* Structure is documented below.
*/
siteVerificationInfos?: pulumi.Input<pulumi.Input<inputs.discoveryengine.TargetSiteSiteVerificationInfo>[]>;
/**
* The unique id of the target site.
*/
targetSiteId?: pulumi.Input<string>;
/**
* The possible target site types.
* Possible values are: `INCLUDE`, `EXCLUDE`.
*/
type?: pulumi.Input<string>;
/**
* The target site's last updated time.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a TargetSite resource.
*/
export interface TargetSiteArgs {
/**
* The unique id of the data store.
*
*
* - - -
*/
dataStoreId: pulumi.Input<string>;
/**
* If set to false, a uriPattern is generated to include all pages whose
* address contains the provided_uri_pattern. If set to true, an uriPattern
* is generated to try to be an exact match of the providedUriPattern or
* just the specific page if the providedUriPattern is a specific one.
* providedUriPattern is always normalized to generate the URI pattern to
* be used by the search engine.
*/
exactMatch?: pulumi.Input<boolean>;
/**
* The geographic location where the data store should reside. The value can
* only be one of "global", "us" and "eu".
*/
location: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The user provided URI pattern from which the `generatedUriPattern` is
* generated.
*/
providedUriPattern: pulumi.Input<string>;
/**
* The possible target site types.
* Possible values are: `INCLUDE`, `EXCLUDE`.
*/
type?: pulumi.Input<string>;
}