import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing an Amazon Bedrock Guardrail. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.Guardrail("example", { * contentPolicyConfig: { * filtersConfigs: [{ * inputStrength: "MEDIUM", * outputStrength: "MEDIUM", * type: "HATE", * }], * tierConfigs: [{ * tierName: "STANDARD", * }], * }, * sensitiveInformationPolicyConfig: { * piiEntitiesConfigs: [{ * action: "BLOCK", * inputAction: "BLOCK", * outputAction: "ANONYMIZE", * inputEnabled: true, * outputEnabled: true, * type: "NAME", * }], * regexesConfigs: [{ * action: "BLOCK", * inputAction: "BLOCK", * outputAction: "BLOCK", * inputEnabled: true, * outputEnabled: false, * description: "example regex", * name: "regex_example", * pattern: "^\\d{3}-\\d{2}-\\d{4}$", * }], * }, * topicPolicyConfig: { * tierConfigs: [{ * tierName: "CLASSIC", * }], * topicsConfigs: [{ * name: "investment_topic", * examples: ["Where should I invest my money ?"], * type: "DENY", * definition: "Investment advice refers to inquiries, guidance, or recommendations regarding the management or allocation of funds or assets with the goal of generating returns .", * }], * }, * wordPolicyConfig: { * managedWordListsConfigs: [{ * type: "PROFANITY", * }], * wordsConfigs: [{ * text: "HATE", * }], * }, * name: "example", * blockedInputMessaging: "example", * blockedOutputsMessaging: "example", * description: "example", * }); * ``` * * ## Import * * Using `pulumi import`, import Amazon Bedrock Guardrail using using a comma-delimited string of `guardrailId` and `version`. For example: * * ```sh * $ pulumi import aws:bedrock/guardrail:Guardrail example guardrail-id-12345678,DRAFT * ``` */ export declare class Guardrail extends pulumi.CustomResource { /** * Get an existing Guardrail 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, state?: GuardrailState, opts?: pulumi.CustomResourceOptions): Guardrail; /** * Returns true if the given object is an instance of Guardrail. 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 Guardrail; /** * Message to return when the guardrail blocks a prompt. */ readonly blockedInputMessaging: pulumi.Output; /** * Message to return when the guardrail blocks a model response. */ readonly blockedOutputsMessaging: pulumi.Output; /** * Content policy config for a guardrail. See `contentPolicyConfig` Block for more information. */ readonly contentPolicyConfig: pulumi.Output; /** * Contextual grounding policy config for a guardrail. See `contextualGroundingPolicyConfig` Block for more information. */ readonly contextualGroundingPolicyConfig: pulumi.Output; /** * Unix epoch timestamp in seconds for when the Guardrail was created. */ readonly createdAt: pulumi.Output; /** * Configuration block to enable cross-region routing for bedrock guardrails. See `crossRegionConfig` Block for more information. Note see [available regions](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region.html) here. */ readonly crossRegionConfig: pulumi.Output; /** * Description of the guardrail or its version. */ readonly description: pulumi.Output; /** * ARN of the Guardrail. */ readonly guardrailArn: pulumi.Output; /** * ID of the Guardrail. */ readonly guardrailId: pulumi.Output; /** * KMS key with which the guardrail was encrypted at rest. */ readonly kmsKeyArn: pulumi.Output; /** * Name of the guardrail. * * The following arguments are optional: */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Sensitive information policy config for a guardrail. See `sensitiveInformationPolicyConfig` Block for more information. */ readonly sensitiveInformationPolicyConfig: pulumi.Output; /** * Status of the Bedrock Guardrail. One of `READY`, `FAILED`. */ readonly status: pulumi.Output; /** * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; readonly timeouts: pulumi.Output; /** * Topic policy config for a guardrail. See `topicPolicyConfig` Block for more information. */ readonly topicPolicyConfig: pulumi.Output; /** * Date and time that the Guardrail list was last updated. */ readonly updatedAt: pulumi.Output; /** * Version of the Guardrail. */ readonly version: pulumi.Output; /** * Word policy config for a guardrail. See `wordPolicyConfig` Block for more information. */ readonly wordPolicyConfig: pulumi.Output; /** * Create a Guardrail 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: GuardrailArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Guardrail resources. */ export interface GuardrailState { /** * Message to return when the guardrail blocks a prompt. */ blockedInputMessaging?: pulumi.Input; /** * Message to return when the guardrail blocks a model response. */ blockedOutputsMessaging?: pulumi.Input; /** * Content policy config for a guardrail. See `contentPolicyConfig` Block for more information. */ contentPolicyConfig?: pulumi.Input; /** * Contextual grounding policy config for a guardrail. See `contextualGroundingPolicyConfig` Block for more information. */ contextualGroundingPolicyConfig?: pulumi.Input; /** * Unix epoch timestamp in seconds for when the Guardrail was created. */ createdAt?: pulumi.Input; /** * Configuration block to enable cross-region routing for bedrock guardrails. See `crossRegionConfig` Block for more information. Note see [available regions](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region.html) here. */ crossRegionConfig?: pulumi.Input; /** * Description of the guardrail or its version. */ description?: pulumi.Input; /** * ARN of the Guardrail. */ guardrailArn?: pulumi.Input; /** * ID of the Guardrail. */ guardrailId?: pulumi.Input; /** * KMS key with which the guardrail was encrypted at rest. */ kmsKeyArn?: pulumi.Input; /** * Name of the guardrail. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Sensitive information policy config for a guardrail. See `sensitiveInformationPolicyConfig` Block for more information. */ sensitiveInformationPolicyConfig?: pulumi.Input; /** * Status of the Bedrock Guardrail. One of `READY`, `FAILED`. */ status?: pulumi.Input; /** * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; /** * Topic policy config for a guardrail. See `topicPolicyConfig` Block for more information. */ topicPolicyConfig?: pulumi.Input; /** * Date and time that the Guardrail list was last updated. */ updatedAt?: pulumi.Input; /** * Version of the Guardrail. */ version?: pulumi.Input; /** * Word policy config for a guardrail. See `wordPolicyConfig` Block for more information. */ wordPolicyConfig?: pulumi.Input; } /** * The set of arguments for constructing a Guardrail resource. */ export interface GuardrailArgs { /** * Message to return when the guardrail blocks a prompt. */ blockedInputMessaging: pulumi.Input; /** * Message to return when the guardrail blocks a model response. */ blockedOutputsMessaging: pulumi.Input; /** * Content policy config for a guardrail. See `contentPolicyConfig` Block for more information. */ contentPolicyConfig?: pulumi.Input; /** * Contextual grounding policy config for a guardrail. See `contextualGroundingPolicyConfig` Block for more information. */ contextualGroundingPolicyConfig?: pulumi.Input; /** * Configuration block to enable cross-region routing for bedrock guardrails. See `crossRegionConfig` Block for more information. Note see [available regions](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region.html) here. */ crossRegionConfig?: pulumi.Input; /** * Description of the guardrail or its version. */ description?: pulumi.Input; /** * KMS key with which the guardrail was encrypted at rest. */ kmsKeyArn?: pulumi.Input; /** * Name of the guardrail. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Sensitive information policy config for a guardrail. See `sensitiveInformationPolicyConfig` Block for more information. */ sensitiveInformationPolicyConfig?: pulumi.Input; /** * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; /** * Topic policy config for a guardrail. See `topicPolicyConfig` Block for more information. */ topicPolicyConfig?: pulumi.Input; /** * Word policy config for a guardrail. See `wordPolicyConfig` Block for more information. */ wordPolicyConfig?: pulumi.Input; } //# sourceMappingURL=guardrail.d.ts.map