import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing an Amazon Bedrock Enforced Guardrail Configuration. * * This resource configures an enforced guardrail that is applied across all Bedrock inference calls in the configured region. * * > Enforced guardrail configuration is configured per AWS region. To avoid overwriting settings, this resource should not be defined in multiple configurations. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.Guardrail("example", { * wordPolicyConfig: { * wordsConfigs: [{ * text: "deny", * }], * }, * name: "example", * blockedInputMessaging: "Blocked input", * blockedOutputsMessaging: "Blocked output", * description: "Example guardrail", * }); * const exampleGuardrailVersion = new aws.bedrock.GuardrailVersion("example", { * guardrailArn: example.guardrailArn, * description: "Example version", * }); * const exampleEnforcedGuardrailConfiguration = new aws.bedrock.EnforcedGuardrailConfiguration("example", { * guardrailArn: example.guardrailArn, * guardrailVersion: exampleGuardrailVersion.version, * }); * ``` * * ### With Selective Content Guarding * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.Guardrail("example", { * wordPolicyConfig: { * wordsConfigs: [{ * text: "deny", * }], * }, * name: "example", * blockedInputMessaging: "Blocked input", * blockedOutputsMessaging: "Blocked output", * description: "Example guardrail", * }); * const exampleGuardrailVersion = new aws.bedrock.GuardrailVersion("example", { * guardrailArn: example.guardrailArn, * description: "Example version", * }); * const exampleEnforcedGuardrailConfiguration = new aws.bedrock.EnforcedGuardrailConfiguration("example", { * selectiveContentGuarding: { * messages: "COMPREHENSIVE", * system: "COMPREHENSIVE", * }, * guardrailArn: example.guardrailArn, * guardrailVersion: exampleGuardrailVersion.version, * }); * ``` * * ### With Model Enforcement * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.Guardrail("example", { * wordPolicyConfig: { * wordsConfigs: [{ * text: "deny", * }], * }, * name: "example", * blockedInputMessaging: "Blocked input", * blockedOutputsMessaging: "Blocked output", * description: "Example guardrail", * }); * const exampleGuardrailVersion = new aws.bedrock.GuardrailVersion("example", { * guardrailArn: example.guardrailArn, * description: "Example version", * }); * const exampleEnforcedGuardrailConfiguration = new aws.bedrock.EnforcedGuardrailConfiguration("example", { * modelEnforcement: { * includedModels: ["ALL"], * excludedModels: [], * }, * guardrailArn: example.guardrailArn, * guardrailVersion: exampleGuardrailVersion.version, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `configId` (String) Configuration ID. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Bedrock Enforced Guardrail Configuration using `configId`. For example: * * ```sh * $ pulumi import aws:bedrock/enforcedGuardrailConfiguration:EnforcedGuardrailConfiguration example TODO * ``` */ export declare class EnforcedGuardrailConfiguration extends pulumi.CustomResource { /** * Get an existing EnforcedGuardrailConfiguration 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?: EnforcedGuardrailConfigurationState, opts?: pulumi.CustomResourceOptions): EnforcedGuardrailConfiguration; /** * Check whether an existing EnforcedGuardrailConfiguration resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: EnforcedGuardrailConfigurationState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of EnforcedGuardrailConfiguration. 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 EnforcedGuardrailConfiguration; /** * Unique ID for the account enforced configuration. */ readonly configId: pulumi.Output; /** * Guardrail ARN. */ readonly guardrailArn: pulumi.Output; /** * Unique ID of the guardrail. */ readonly guardrailId: pulumi.Output; /** * Numerical guardrail version. Must be a published version number (e.g., `1`, `2`). `DRAFT` is not supported. * * The following arguments are optional: */ readonly guardrailVersion: pulumi.Output; /** * Model-specific information for the enforced guardrail configuration. If not present, the configuration is enforced on all models. See `modelEnforcement` Block below. */ readonly modelEnforcement: pulumi.Output; /** * Configuration owner type. Value: `ACCOUNT`. */ readonly owner: 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; /** * Selective content guarding controls for enforced guardrails. See `selectiveContentGuarding` Block below. */ readonly selectiveContentGuarding: pulumi.Output; /** * Create a EnforcedGuardrailConfiguration 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: EnforcedGuardrailConfigurationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EnforcedGuardrailConfiguration resources. */ export interface EnforcedGuardrailConfigurationState { /** * Unique ID for the account enforced configuration. */ configId?: pulumi.Input; /** * Guardrail ARN. */ guardrailArn?: pulumi.Input; /** * Unique ID of the guardrail. */ guardrailId?: pulumi.Input; /** * Numerical guardrail version. Must be a published version number (e.g., `1`, `2`). `DRAFT` is not supported. * * The following arguments are optional: */ guardrailVersion?: pulumi.Input; /** * Model-specific information for the enforced guardrail configuration. If not present, the configuration is enforced on all models. See `modelEnforcement` Block below. */ modelEnforcement?: pulumi.Input; /** * Configuration owner type. Value: `ACCOUNT`. */ owner?: 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; /** * Selective content guarding controls for enforced guardrails. See `selectiveContentGuarding` Block below. */ selectiveContentGuarding?: pulumi.Input; } /** * The set of arguments for constructing a EnforcedGuardrailConfiguration resource. */ export interface EnforcedGuardrailConfigurationArgs { /** * Guardrail ARN. */ guardrailArn: pulumi.Input; /** * Numerical guardrail version. Must be a published version number (e.g., `1`, `2`). `DRAFT` is not supported. * * The following arguments are optional: */ guardrailVersion: pulumi.Input; /** * Model-specific information for the enforced guardrail configuration. If not present, the configuration is enforced on all models. See `modelEnforcement` Block below. */ modelEnforcement?: 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; /** * Selective content guarding controls for enforced guardrails. See `selectiveContentGuarding` Block below. */ selectiveContentGuarding?: pulumi.Input; } //# sourceMappingURL=enforcedGuardrailConfiguration.d.ts.map