UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

231 lines (230 loc) • 8.37 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A `Template` is a resource of Model Armor that lets you configure how Model Armor screens prompts and responses. * It functions as sets of customized filters and thresholds for different safety and security confidence levels, allowing control over what content is flagged. * * ## Example Usage * * ### Modelarmor Template Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const template_basic = new gcp.modelarmor.Template("template-basic", { * location: "<no value>", * templateId: "<no value>", * filterConfig: {}, * templateMetadata: {}, * }); * ``` * ## Import * * Template can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/templates/{{template_id}}` * * * `{{project}}/{{location}}/{{template_id}}` * * * `{{location}}/{{template_id}}` * * When using the `pulumi import` command, Template can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:modelarmor/template:Template default projects/{{project}}/locations/{{location}}/templates/{{template_id}} * ``` * * ```sh * $ pulumi import gcp:modelarmor/template:Template default {{project}}/{{location}}/{{template_id}} * ``` * * ```sh * $ pulumi import gcp:modelarmor/template:Template default {{location}}/{{template_id}} * ``` */ export declare class Template extends pulumi.CustomResource { /** * Get an existing Template 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?: TemplateState, opts?: pulumi.CustomResourceOptions): Template; /** * Returns true if the given object is an instance of Template. 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 Template; /** * Create time stamp */ readonly createTime: pulumi.Output<string>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Filters configuration. * Structure is documented below. */ readonly filterConfig: pulumi.Output<outputs.modelarmor.TemplateFilterConfig>; /** * Labels as key value pairs * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ readonly location: pulumi.Output<string>; /** * Identifier. name of resource */ 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 combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Id of the requesting object * If auto-generating Id server-side, remove this field and * templateId from the methodSignature of Create RPC */ readonly templateId: pulumi.Output<string>; /** * Message describing TemplateMetadata * Structure is documented below. */ readonly templateMetadata: pulumi.Output<outputs.modelarmor.TemplateTemplateMetadata | undefined>; /** * Update time stamp */ readonly updateTime: pulumi.Output<string>; /** * Create a Template 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: TemplateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Template resources. */ export interface TemplateState { /** * Create time stamp */ createTime?: pulumi.Input<string>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Filters configuration. * Structure is documented below. */ filterConfig?: pulumi.Input<inputs.modelarmor.TemplateFilterConfig>; /** * Labels as key value pairs * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location?: pulumi.Input<string>; /** * Identifier. name of resource */ 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 combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Id of the requesting object * If auto-generating Id server-side, remove this field and * templateId from the methodSignature of Create RPC */ templateId?: pulumi.Input<string>; /** * Message describing TemplateMetadata * Structure is documented below. */ templateMetadata?: pulumi.Input<inputs.modelarmor.TemplateTemplateMetadata>; /** * Update time stamp */ updateTime?: pulumi.Input<string>; } /** * The set of arguments for constructing a Template resource. */ export interface TemplateArgs { /** * Filters configuration. * Structure is documented below. */ filterConfig: pulumi.Input<inputs.modelarmor.TemplateFilterConfig>; /** * Labels as key value pairs * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ 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>; /** * Id of the requesting object * If auto-generating Id server-side, remove this field and * templateId from the methodSignature of Create RPC */ templateId: pulumi.Input<string>; /** * Message describing TemplateMetadata * Structure is documented below. */ templateMetadata?: pulumi.Input<inputs.modelarmor.TemplateTemplateMetadata>; }