import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Cognitive Services Account RAI Policy. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "East US", * }); * const exampleAccount = new azure.cognitive.Account("example", { * name: "example-account", * location: example.location, * resourceGroupName: example.name, * kind: "OpenAI", * skuName: "S0", * }); * const exampleAccountRaiPolicy = new azure.cognitive.AccountRaiPolicy("example", { * name: "example-rai-policy", * cognitiveAccountId: exampleAccount.id, * basePolicyName: "Microsoft.Default", * contentFilters: [{ * name: "Hate", * filterEnabled: true, * blockEnabled: true, * severityThreshold: "High", * source: "Prompt", * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.CognitiveServices` - 2025-06-01 * * ## Import * * Cognitive Service Account RAI Policies can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:cognitive/accountRaiPolicy:AccountRaiPolicy policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1/raiPolicies/policy1 * ``` */ export declare class AccountRaiPolicy extends pulumi.CustomResource { /** * Get an existing AccountRaiPolicy 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?: AccountRaiPolicyState, opts?: pulumi.CustomResourceOptions): AccountRaiPolicy; /** * Returns true if the given object is an instance of AccountRaiPolicy. 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 AccountRaiPolicy; /** * The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created. */ readonly basePolicyName: pulumi.Output; /** * The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created. */ readonly cognitiveAccountId: pulumi.Output; /** * A `contentFilter` block as defined below. */ readonly contentFilters: pulumi.Output; /** * The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`. */ readonly mode: pulumi.Output; /** * The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a AccountRaiPolicy 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: AccountRaiPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AccountRaiPolicy resources. */ export interface AccountRaiPolicyState { /** * The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created. */ basePolicyName?: pulumi.Input; /** * The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created. */ cognitiveAccountId?: pulumi.Input; /** * A `contentFilter` block as defined below. */ contentFilters?: pulumi.Input[]>; /** * The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`. */ mode?: pulumi.Input; /** * The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a AccountRaiPolicy resource. */ export interface AccountRaiPolicyArgs { /** * The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created. */ basePolicyName: pulumi.Input; /** * The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created. */ cognitiveAccountId: pulumi.Input; /** * A `contentFilter` block as defined below. */ contentFilters: pulumi.Input[]>; /** * The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`. */ mode?: pulumi.Input; /** * The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }