1. Packages
  2. Azure Native
  3. API Docs
  4. cognitiveservices
  5. SubscriptionRaiPolicy
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.13.0 published on Wednesday, Jan 28, 2026 by Pulumi
azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.13.0 published on Wednesday, Jan 28, 2026 by Pulumi

    Cognitive Services RaiPolicy.

    Uses Azure REST API version 2025-10-01-preview.

    Example Usage

    PutRaiPolicy

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var subscriptionRaiPolicy = new AzureNative.CognitiveServices.SubscriptionRaiPolicy("subscriptionRaiPolicy", new()
        {
            Properties = new AzureNative.CognitiveServices.Inputs.RaiPolicyPropertiesArgs
            {
                BasePolicyName = "Microsoft.Default",
                ContentFilters = new[]
                {
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = false,
                        Enabled = false,
                        Name = "Hate",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.High,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Prompt,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Hate",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.Medium,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Completion,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Sexual",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.High,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Prompt,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Sexual",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.Medium,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Completion,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Selfharm",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.High,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Prompt,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Selfharm",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.Medium,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Completion,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Violence",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.Medium,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Prompt,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Violence",
                        SeverityThreshold = AzureNative.CognitiveServices.ContentLevel.Medium,
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Completion,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Jailbreak",
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Prompt,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Protected Material Text",
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Completion,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Protected Material Code",
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Completion,
                    },
                    new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                    {
                        Blocking = true,
                        Enabled = true,
                        Name = "Profanity",
                        Source = AzureNative.CognitiveServices.RaiPolicyContentSource.Prompt,
                    },
                },
                Mode = AzureNative.CognitiveServices.RaiPolicyMode.Asynchronous_filter,
            },
            RaiPolicyName = "raiPolicyName",
        });
    
    });
    
    package main
    
    import (
    	cognitiveservices "github.com/pulumi/pulumi-azure-native-sdk/cognitiveservices/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cognitiveservices.NewSubscriptionRaiPolicy(ctx, "subscriptionRaiPolicy", &cognitiveservices.SubscriptionRaiPolicyArgs{
    			Properties: &cognitiveservices.RaiPolicyPropertiesArgs{
    				BasePolicyName: pulumi.String("Microsoft.Default"),
    				ContentFilters: cognitiveservices.RaiPolicyContentFilterArray{
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(false),
    						Enabled:           pulumi.Bool(false),
    						Name:              pulumi.String("Hate"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelHigh),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourcePrompt),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(true),
    						Enabled:           pulumi.Bool(true),
    						Name:              pulumi.String("Hate"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelMedium),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourceCompletion),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(true),
    						Enabled:           pulumi.Bool(true),
    						Name:              pulumi.String("Sexual"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelHigh),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourcePrompt),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(true),
    						Enabled:           pulumi.Bool(true),
    						Name:              pulumi.String("Sexual"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelMedium),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourceCompletion),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(true),
    						Enabled:           pulumi.Bool(true),
    						Name:              pulumi.String("Selfharm"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelHigh),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourcePrompt),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(true),
    						Enabled:           pulumi.Bool(true),
    						Name:              pulumi.String("Selfharm"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelMedium),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourceCompletion),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(true),
    						Enabled:           pulumi.Bool(true),
    						Name:              pulumi.String("Violence"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelMedium),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourcePrompt),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking:          pulumi.Bool(true),
    						Enabled:           pulumi.Bool(true),
    						Name:              pulumi.String("Violence"),
    						SeverityThreshold: pulumi.String(cognitiveservices.ContentLevelMedium),
    						Source:            pulumi.String(cognitiveservices.RaiPolicyContentSourceCompletion),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking: pulumi.Bool(true),
    						Enabled:  pulumi.Bool(true),
    						Name:     pulumi.String("Jailbreak"),
    						Source:   pulumi.String(cognitiveservices.RaiPolicyContentSourcePrompt),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking: pulumi.Bool(true),
    						Enabled:  pulumi.Bool(true),
    						Name:     pulumi.String("Protected Material Text"),
    						Source:   pulumi.String(cognitiveservices.RaiPolicyContentSourceCompletion),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking: pulumi.Bool(true),
    						Enabled:  pulumi.Bool(true),
    						Name:     pulumi.String("Protected Material Code"),
    						Source:   pulumi.String(cognitiveservices.RaiPolicyContentSourceCompletion),
    					},
    					&cognitiveservices.RaiPolicyContentFilterArgs{
    						Blocking: pulumi.Bool(true),
    						Enabled:  pulumi.Bool(true),
    						Name:     pulumi.String("Profanity"),
    						Source:   pulumi.String(cognitiveservices.RaiPolicyContentSourcePrompt),
    					},
    				},
    				Mode: pulumi.String(cognitiveservices.RaiPolicyMode_Asynchronous_filter),
    			},
    			RaiPolicyName: pulumi.String("raiPolicyName"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.cognitiveservices.SubscriptionRaiPolicy;
    import com.pulumi.azurenative.cognitiveservices.SubscriptionRaiPolicyArgs;
    import com.pulumi.azurenative.cognitiveservices.inputs.RaiPolicyPropertiesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var subscriptionRaiPolicy = new SubscriptionRaiPolicy("subscriptionRaiPolicy", SubscriptionRaiPolicyArgs.builder()
                .properties(RaiPolicyPropertiesArgs.builder()
                    .basePolicyName("Microsoft.Default")
                    .contentFilters(                
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(false)
                            .enabled(false)
                            .name("Hate")
                            .severityThreshold("High")
                            .source("Prompt")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Hate")
                            .severityThreshold("Medium")
                            .source("Completion")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Sexual")
                            .severityThreshold("High")
                            .source("Prompt")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Sexual")
                            .severityThreshold("Medium")
                            .source("Completion")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Selfharm")
                            .severityThreshold("High")
                            .source("Prompt")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Selfharm")
                            .severityThreshold("Medium")
                            .source("Completion")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Violence")
                            .severityThreshold("Medium")
                            .source("Prompt")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Violence")
                            .severityThreshold("Medium")
                            .source("Completion")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Jailbreak")
                            .source("Prompt")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Protected Material Text")
                            .source("Completion")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Protected Material Code")
                            .source("Completion")
                            .build(),
                        RaiPolicyContentFilterArgs.builder()
                            .blocking(true)
                            .enabled(true)
                            .name("Profanity")
                            .source("Prompt")
                            .build())
                    .mode("Asynchronous_filter")
                    .build())
                .raiPolicyName("raiPolicyName")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const subscriptionRaiPolicy = new azure_native.cognitiveservices.SubscriptionRaiPolicy("subscriptionRaiPolicy", {
        properties: {
            basePolicyName: "Microsoft.Default",
            contentFilters: [
                {
                    blocking: false,
                    enabled: false,
                    name: "Hate",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.High,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Prompt,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Hate",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.Medium,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Completion,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Sexual",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.High,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Prompt,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Sexual",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.Medium,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Completion,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Selfharm",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.High,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Prompt,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Selfharm",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.Medium,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Completion,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Violence",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.Medium,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Prompt,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Violence",
                    severityThreshold: azure_native.cognitiveservices.ContentLevel.Medium,
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Completion,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Jailbreak",
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Prompt,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Protected Material Text",
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Completion,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Protected Material Code",
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Completion,
                },
                {
                    blocking: true,
                    enabled: true,
                    name: "Profanity",
                    source: azure_native.cognitiveservices.RaiPolicyContentSource.Prompt,
                },
            ],
            mode: azure_native.cognitiveservices.RaiPolicyMode.Asynchronous_filter,
        },
        raiPolicyName: "raiPolicyName",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    subscription_rai_policy = azure_native.cognitiveservices.SubscriptionRaiPolicy("subscriptionRaiPolicy",
        properties={
            "base_policy_name": "Microsoft.Default",
            "content_filters": [
                {
                    "blocking": False,
                    "enabled": False,
                    "name": "Hate",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.HIGH,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.PROMPT,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Hate",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.MEDIUM,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.COMPLETION,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Sexual",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.HIGH,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.PROMPT,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Sexual",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.MEDIUM,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.COMPLETION,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Selfharm",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.HIGH,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.PROMPT,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Selfharm",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.MEDIUM,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.COMPLETION,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Violence",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.MEDIUM,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.PROMPT,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Violence",
                    "severity_threshold": azure_native.cognitiveservices.ContentLevel.MEDIUM,
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.COMPLETION,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Jailbreak",
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.PROMPT,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Protected Material Text",
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.COMPLETION,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Protected Material Code",
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.COMPLETION,
                },
                {
                    "blocking": True,
                    "enabled": True,
                    "name": "Profanity",
                    "source": azure_native.cognitiveservices.RaiPolicyContentSource.PROMPT,
                },
            ],
            "mode": azure_native.cognitiveservices.RaiPolicyMode.ASYNCHRONOUS_FILTER,
        },
        rai_policy_name="raiPolicyName")
    
    resources:
      subscriptionRaiPolicy:
        type: azure-native:cognitiveservices:SubscriptionRaiPolicy
        properties:
          properties:
            basePolicyName: Microsoft.Default
            contentFilters:
              - blocking: false
                enabled: false
                name: Hate
                severityThreshold: High
                source: Prompt
              - blocking: true
                enabled: true
                name: Hate
                severityThreshold: Medium
                source: Completion
              - blocking: true
                enabled: true
                name: Sexual
                severityThreshold: High
                source: Prompt
              - blocking: true
                enabled: true
                name: Sexual
                severityThreshold: Medium
                source: Completion
              - blocking: true
                enabled: true
                name: Selfharm
                severityThreshold: High
                source: Prompt
              - blocking: true
                enabled: true
                name: Selfharm
                severityThreshold: Medium
                source: Completion
              - blocking: true
                enabled: true
                name: Violence
                severityThreshold: Medium
                source: Prompt
              - blocking: true
                enabled: true
                name: Violence
                severityThreshold: Medium
                source: Completion
              - blocking: true
                enabled: true
                name: Jailbreak
                source: Prompt
              - blocking: true
                enabled: true
                name: Protected Material Text
                source: Completion
              - blocking: true
                enabled: true
                name: Protected Material Code
                source: Completion
              - blocking: true
                enabled: true
                name: Profanity
                source: Prompt
            mode: Asynchronous_filter
          raiPolicyName: raiPolicyName
    

    Create SubscriptionRaiPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SubscriptionRaiPolicy(name: string, args?: SubscriptionRaiPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def SubscriptionRaiPolicy(resource_name: str,
                              args: Optional[SubscriptionRaiPolicyArgs] = None,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def SubscriptionRaiPolicy(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              properties: Optional[RaiPolicyPropertiesArgs] = None,
                              rai_policy_name: Optional[str] = None,
                              tags: Optional[Mapping[str, str]] = None)
    func NewSubscriptionRaiPolicy(ctx *Context, name string, args *SubscriptionRaiPolicyArgs, opts ...ResourceOption) (*SubscriptionRaiPolicy, error)
    public SubscriptionRaiPolicy(string name, SubscriptionRaiPolicyArgs? args = null, CustomResourceOptions? opts = null)
    public SubscriptionRaiPolicy(String name, SubscriptionRaiPolicyArgs args)
    public SubscriptionRaiPolicy(String name, SubscriptionRaiPolicyArgs args, CustomResourceOptions options)
    
    type: azure-native:cognitiveservices:SubscriptionRaiPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SubscriptionRaiPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubscriptionRaiPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubscriptionRaiPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubscriptionRaiPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubscriptionRaiPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var subscriptionRaiPolicyResource = new AzureNative.CognitiveServices.SubscriptionRaiPolicy("subscriptionRaiPolicyResource", new()
    {
        Properties = new AzureNative.CognitiveServices.Inputs.RaiPolicyPropertiesArgs
        {
            BasePolicyName = "string",
            ContentFilters = new[]
            {
                new AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterArgs
                {
                    Action = "string",
                    Blocking = false,
                    Enabled = false,
                    Name = "string",
                    SeverityThreshold = "string",
                    Source = "string",
                },
            },
            CustomBlocklists = new[]
            {
                new AzureNative.CognitiveServices.Inputs.CustomBlocklistConfigArgs
                {
                    Blocking = false,
                    BlocklistName = "string",
                    Source = "string",
                },
            },
            CustomTopics = new[]
            {
                new AzureNative.CognitiveServices.Inputs.CustomTopicConfigArgs
                {
                    Blocking = false,
                    Source = "string",
                    TopicName = "string",
                },
            },
            Mode = "string",
            SafetyProviders = new[]
            {
                new AzureNative.CognitiveServices.Inputs.SafetyProviderConfigArgs
                {
                    Blocking = false,
                    SafetyProviderName = "string",
                    Source = "string",
                },
            },
        },
        RaiPolicyName = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := cognitiveservices.NewSubscriptionRaiPolicy(ctx, "subscriptionRaiPolicyResource", &cognitiveservices.SubscriptionRaiPolicyArgs{
    	Properties: &cognitiveservices.RaiPolicyPropertiesArgs{
    		BasePolicyName: pulumi.String("string"),
    		ContentFilters: cognitiveservices.RaiPolicyContentFilterArray{
    			&cognitiveservices.RaiPolicyContentFilterArgs{
    				Action:            pulumi.String("string"),
    				Blocking:          pulumi.Bool(false),
    				Enabled:           pulumi.Bool(false),
    				Name:              pulumi.String("string"),
    				SeverityThreshold: pulumi.String("string"),
    				Source:            pulumi.String("string"),
    			},
    		},
    		CustomBlocklists: cognitiveservices.CustomBlocklistConfigArray{
    			&cognitiveservices.CustomBlocklistConfigArgs{
    				Blocking:      pulumi.Bool(false),
    				BlocklistName: pulumi.String("string"),
    				Source:        pulumi.String("string"),
    			},
    		},
    		CustomTopics: cognitiveservices.CustomTopicConfigArray{
    			&cognitiveservices.CustomTopicConfigArgs{
    				Blocking:  pulumi.Bool(false),
    				Source:    pulumi.String("string"),
    				TopicName: pulumi.String("string"),
    			},
    		},
    		Mode: pulumi.String("string"),
    		SafetyProviders: cognitiveservices.SafetyProviderConfigArray{
    			&cognitiveservices.SafetyProviderConfigArgs{
    				Blocking:           pulumi.Bool(false),
    				SafetyProviderName: pulumi.String("string"),
    				Source:             pulumi.String("string"),
    			},
    		},
    	},
    	RaiPolicyName: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var subscriptionRaiPolicyResource = new SubscriptionRaiPolicy("subscriptionRaiPolicyResource", SubscriptionRaiPolicyArgs.builder()
        .properties(RaiPolicyPropertiesArgs.builder()
            .basePolicyName("string")
            .contentFilters(RaiPolicyContentFilterArgs.builder()
                .action("string")
                .blocking(false)
                .enabled(false)
                .name("string")
                .severityThreshold("string")
                .source("string")
                .build())
            .customBlocklists(CustomBlocklistConfigArgs.builder()
                .blocking(false)
                .blocklistName("string")
                .source("string")
                .build())
            .customTopics(CustomTopicConfigArgs.builder()
                .blocking(false)
                .source("string")
                .topicName("string")
                .build())
            .mode("string")
            .safetyProviders(SafetyProviderConfigArgs.builder()
                .blocking(false)
                .safetyProviderName("string")
                .source("string")
                .build())
            .build())
        .raiPolicyName("string")
        .tags(Map.of("string", "string"))
        .build());
    
    subscription_rai_policy_resource = azure_native.cognitiveservices.SubscriptionRaiPolicy("subscriptionRaiPolicyResource",
        properties={
            "base_policy_name": "string",
            "content_filters": [{
                "action": "string",
                "blocking": False,
                "enabled": False,
                "name": "string",
                "severity_threshold": "string",
                "source": "string",
            }],
            "custom_blocklists": [{
                "blocking": False,
                "blocklist_name": "string",
                "source": "string",
            }],
            "custom_topics": [{
                "blocking": False,
                "source": "string",
                "topic_name": "string",
            }],
            "mode": "string",
            "safety_providers": [{
                "blocking": False,
                "safety_provider_name": "string",
                "source": "string",
            }],
        },
        rai_policy_name="string",
        tags={
            "string": "string",
        })
    
    const subscriptionRaiPolicyResource = new azure_native.cognitiveservices.SubscriptionRaiPolicy("subscriptionRaiPolicyResource", {
        properties: {
            basePolicyName: "string",
            contentFilters: [{
                action: "string",
                blocking: false,
                enabled: false,
                name: "string",
                severityThreshold: "string",
                source: "string",
            }],
            customBlocklists: [{
                blocking: false,
                blocklistName: "string",
                source: "string",
            }],
            customTopics: [{
                blocking: false,
                source: "string",
                topicName: "string",
            }],
            mode: "string",
            safetyProviders: [{
                blocking: false,
                safetyProviderName: "string",
                source: "string",
            }],
        },
        raiPolicyName: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:cognitiveservices:SubscriptionRaiPolicy
    properties:
        properties:
            basePolicyName: string
            contentFilters:
                - action: string
                  blocking: false
                  enabled: false
                  name: string
                  severityThreshold: string
                  source: string
            customBlocklists:
                - blocking: false
                  blocklistName: string
                  source: string
            customTopics:
                - blocking: false
                  source: string
                  topicName: string
            mode: string
            safetyProviders:
                - blocking: false
                  safetyProviderName: string
                  source: string
        raiPolicyName: string
        tags:
            string: string
    

    SubscriptionRaiPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SubscriptionRaiPolicy resource accepts the following input properties:

    Properties Pulumi.AzureNative.CognitiveServices.Inputs.RaiPolicyProperties
    Properties of Cognitive Services RaiPolicy.
    RaiPolicyName string
    The name of the RaiPolicy associated with the Cognitive Services Account
    Tags Dictionary<string, string>
    Resource tags.
    Properties RaiPolicyPropertiesArgs
    Properties of Cognitive Services RaiPolicy.
    RaiPolicyName string
    The name of the RaiPolicy associated with the Cognitive Services Account
    Tags map[string]string
    Resource tags.
    properties RaiPolicyProperties
    Properties of Cognitive Services RaiPolicy.
    raiPolicyName String
    The name of the RaiPolicy associated with the Cognitive Services Account
    tags Map<String,String>
    Resource tags.
    properties RaiPolicyProperties
    Properties of Cognitive Services RaiPolicy.
    raiPolicyName string
    The name of the RaiPolicy associated with the Cognitive Services Account
    tags {[key: string]: string}
    Resource tags.
    properties RaiPolicyPropertiesArgs
    Properties of Cognitive Services RaiPolicy.
    rai_policy_name str
    The name of the RaiPolicy associated with the Cognitive Services Account
    tags Mapping[str, str]
    Resource tags.
    properties Property Map
    Properties of Cognitive Services RaiPolicy.
    raiPolicyName String
    The name of the RaiPolicy associated with the Cognitive Services Account
    tags Map<String>
    Resource tags.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SubscriptionRaiPolicy resource produces the following output properties:

    AzureApiVersion string
    The Azure API version of the resource.
    Etag string
    Resource Etag.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    SystemData Pulumi.AzureNative.CognitiveServices.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    AzureApiVersion string
    The Azure API version of the resource.
    Etag string
    Resource Etag.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    etag String
    Resource Etag.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion string
    The Azure API version of the resource.
    etag string
    Resource Etag.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azure_api_version str
    The Azure API version of the resource.
    etag str
    Resource Etag.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    etag String
    Resource Etag.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    ContentLevel, ContentLevelArgs

    Low
    Low
    Medium
    Medium
    High
    High
    ContentLevelLow
    Low
    ContentLevelMedium
    Medium
    ContentLevelHigh
    High
    Low
    Low
    Medium
    Medium
    High
    High
    Low
    Low
    Medium
    Medium
    High
    High
    LOW
    Low
    MEDIUM
    Medium
    HIGH
    High
    "Low"
    Low
    "Medium"
    Medium
    "High"
    High

    CustomBlocklistConfig, CustomBlocklistConfigArgs

    Gets or sets the source to which filter applies.
    Blocking bool
    If blocking would occur.
    BlocklistName string
    Name of ContentFilter.
    Source string | Pulumi.AzureNative.CognitiveServices.RaiPolicyContentSource
    Content source to apply the Content Filters.
    Blocking bool
    If blocking would occur.
    BlocklistName string
    Name of ContentFilter.
    Source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    blocklistName String
    Name of ContentFilter.
    source String | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking boolean
    If blocking would occur.
    blocklistName string
    Name of ContentFilter.
    source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking bool
    If blocking would occur.
    blocklist_name str
    Name of ContentFilter.
    source str | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    blocklistName String
    Name of ContentFilter.
    source String | "Prompt" | "Completion" | "PreToolCall" | "PostToolCall" | "PreRun" | "PostRun"
    Content source to apply the Content Filters.

    CustomBlocklistConfigResponse, CustomBlocklistConfigResponseArgs

    Gets or sets the source to which filter applies.
    Blocking bool
    If blocking would occur.
    BlocklistName string
    Name of ContentFilter.
    Source string
    Content source to apply the Content Filters.
    Blocking bool
    If blocking would occur.
    BlocklistName string
    Name of ContentFilter.
    Source string
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    blocklistName String
    Name of ContentFilter.
    source String
    Content source to apply the Content Filters.
    blocking boolean
    If blocking would occur.
    blocklistName string
    Name of ContentFilter.
    source string
    Content source to apply the Content Filters.
    blocking bool
    If blocking would occur.
    blocklist_name str
    Name of ContentFilter.
    source str
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    blocklistName String
    Name of ContentFilter.
    source String
    Content source to apply the Content Filters.

    CustomTopicConfig, CustomTopicConfigArgs

    Gets or sets the source to which filter applies.
    Blocking bool
    If blocking would occur.
    Source string | Pulumi.AzureNative.CognitiveServices.RaiPolicyContentSource
    Content source to apply the Content Filters.
    TopicName string
    Name of RAI topic.
    Blocking bool
    If blocking would occur.
    Source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    TopicName string
    Name of RAI topic.
    blocking Boolean
    If blocking would occur.
    source String | RaiPolicyContentSource
    Content source to apply the Content Filters.
    topicName String
    Name of RAI topic.
    blocking boolean
    If blocking would occur.
    source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    topicName string
    Name of RAI topic.
    blocking bool
    If blocking would occur.
    source str | RaiPolicyContentSource
    Content source to apply the Content Filters.
    topic_name str
    Name of RAI topic.
    blocking Boolean
    If blocking would occur.
    source String | "Prompt" | "Completion" | "PreToolCall" | "PostToolCall" | "PreRun" | "PostRun"
    Content source to apply the Content Filters.
    topicName String
    Name of RAI topic.

    CustomTopicConfigResponse, CustomTopicConfigResponseArgs

    Gets or sets the source to which filter applies.
    Blocking bool
    If blocking would occur.
    Source string
    Content source to apply the Content Filters.
    TopicName string
    Name of RAI topic.
    Blocking bool
    If blocking would occur.
    Source string
    Content source to apply the Content Filters.
    TopicName string
    Name of RAI topic.
    blocking Boolean
    If blocking would occur.
    source String
    Content source to apply the Content Filters.
    topicName String
    Name of RAI topic.
    blocking boolean
    If blocking would occur.
    source string
    Content source to apply the Content Filters.
    topicName string
    Name of RAI topic.
    blocking bool
    If blocking would occur.
    source str
    Content source to apply the Content Filters.
    topic_name str
    Name of RAI topic.
    blocking Boolean
    If blocking would occur.
    source String
    Content source to apply the Content Filters.
    topicName String
    Name of RAI topic.

    RaiActionType, RaiActionTypeArgs

    None
    None
    BLOCKING
    BLOCKING
    ANNOTATING
    ANNOTATING
    HITL
    HITL
    RETRY
    RETRY
    RaiActionTypeNone
    None
    RaiActionTypeBLOCKING
    BLOCKING
    RaiActionTypeANNOTATING
    ANNOTATING
    RaiActionTypeHITL
    HITL
    RaiActionTypeRETRY
    RETRY
    None
    None
    BLOCKING
    BLOCKING
    ANNOTATING
    ANNOTATING
    HITL
    HITL
    RETRY
    RETRY
    None
    None
    BLOCKING
    BLOCKING
    ANNOTATING
    ANNOTATING
    HITL
    HITL
    RETRY
    RETRY
    NONE
    None
    BLOCKING
    BLOCKING
    ANNOTATING
    ANNOTATING
    HITL
    HITL
    RETRY
    RETRY
    "None"
    None
    "BLOCKING"
    BLOCKING
    "ANNOTATING"
    ANNOTATING
    "HITL"
    HITL
    "RETRY"
    RETRY

    RaiPolicyContentFilter, RaiPolicyContentFilterArgs

    Azure OpenAI Content Filter.
    Action string | Pulumi.AzureNative.CognitiveServices.RaiActionType
    The action types to apply to the content filters
    Blocking bool
    If blocking would occur.
    Enabled bool
    If the ContentFilter is enabled.
    Name string
    Name of ContentFilter.
    SeverityThreshold string | Pulumi.AzureNative.CognitiveServices.ContentLevel
    Level at which content is filtered.
    Source string | Pulumi.AzureNative.CognitiveServices.RaiPolicyContentSource
    Content source to apply the Content Filters.
    Action string | RaiActionType
    The action types to apply to the content filters
    Blocking bool
    If blocking would occur.
    Enabled bool
    If the ContentFilter is enabled.
    Name string
    Name of ContentFilter.
    SeverityThreshold string | ContentLevel
    Level at which content is filtered.
    Source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    action String | RaiActionType
    The action types to apply to the content filters
    blocking Boolean
    If blocking would occur.
    enabled Boolean
    If the ContentFilter is enabled.
    name String
    Name of ContentFilter.
    severityThreshold String | ContentLevel
    Level at which content is filtered.
    source String | RaiPolicyContentSource
    Content source to apply the Content Filters.
    action string | RaiActionType
    The action types to apply to the content filters
    blocking boolean
    If blocking would occur.
    enabled boolean
    If the ContentFilter is enabled.
    name string
    Name of ContentFilter.
    severityThreshold string | ContentLevel
    Level at which content is filtered.
    source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    action str | RaiActionType
    The action types to apply to the content filters
    blocking bool
    If blocking would occur.
    enabled bool
    If the ContentFilter is enabled.
    name str
    Name of ContentFilter.
    severity_threshold str | ContentLevel
    Level at which content is filtered.
    source str | RaiPolicyContentSource
    Content source to apply the Content Filters.
    action String | "None" | "BLOCKING" | "ANNOTATING" | "HITL" | "RETRY"
    The action types to apply to the content filters
    blocking Boolean
    If blocking would occur.
    enabled Boolean
    If the ContentFilter is enabled.
    name String
    Name of ContentFilter.
    severityThreshold String | "Low" | "Medium" | "High"
    Level at which content is filtered.
    source String | "Prompt" | "Completion" | "PreToolCall" | "PostToolCall" | "PreRun" | "PostRun"
    Content source to apply the Content Filters.

    RaiPolicyContentFilterResponse, RaiPolicyContentFilterResponseArgs

    Azure OpenAI Content Filter.
    Action string
    The action types to apply to the content filters
    Blocking bool
    If blocking would occur.
    Enabled bool
    If the ContentFilter is enabled.
    Name string
    Name of ContentFilter.
    SeverityThreshold string
    Level at which content is filtered.
    Source string
    Content source to apply the Content Filters.
    Action string
    The action types to apply to the content filters
    Blocking bool
    If blocking would occur.
    Enabled bool
    If the ContentFilter is enabled.
    Name string
    Name of ContentFilter.
    SeverityThreshold string
    Level at which content is filtered.
    Source string
    Content source to apply the Content Filters.
    action String
    The action types to apply to the content filters
    blocking Boolean
    If blocking would occur.
    enabled Boolean
    If the ContentFilter is enabled.
    name String
    Name of ContentFilter.
    severityThreshold String
    Level at which content is filtered.
    source String
    Content source to apply the Content Filters.
    action string
    The action types to apply to the content filters
    blocking boolean
    If blocking would occur.
    enabled boolean
    If the ContentFilter is enabled.
    name string
    Name of ContentFilter.
    severityThreshold string
    Level at which content is filtered.
    source string
    Content source to apply the Content Filters.
    action str
    The action types to apply to the content filters
    blocking bool
    If blocking would occur.
    enabled bool
    If the ContentFilter is enabled.
    name str
    Name of ContentFilter.
    severity_threshold str
    Level at which content is filtered.
    source str
    Content source to apply the Content Filters.
    action String
    The action types to apply to the content filters
    blocking Boolean
    If blocking would occur.
    enabled Boolean
    If the ContentFilter is enabled.
    name String
    Name of ContentFilter.
    severityThreshold String
    Level at which content is filtered.
    source String
    Content source to apply the Content Filters.

    RaiPolicyContentSource, RaiPolicyContentSourceArgs

    Prompt
    Prompt
    Completion
    Completion
    PreToolCall
    PreToolCall
    PostToolCall
    PostToolCall
    PreRun
    PreRun
    PostRun
    PostRun
    RaiPolicyContentSourcePrompt
    Prompt
    RaiPolicyContentSourceCompletion
    Completion
    RaiPolicyContentSourcePreToolCall
    PreToolCall
    RaiPolicyContentSourcePostToolCall
    PostToolCall
    RaiPolicyContentSourcePreRun
    PreRun
    RaiPolicyContentSourcePostRun
    PostRun
    Prompt
    Prompt
    Completion
    Completion
    PreToolCall
    PreToolCall
    PostToolCall
    PostToolCall
    PreRun
    PreRun
    PostRun
    PostRun
    Prompt
    Prompt
    Completion
    Completion
    PreToolCall
    PreToolCall
    PostToolCall
    PostToolCall
    PreRun
    PreRun
    PostRun
    PostRun
    PROMPT
    Prompt
    COMPLETION
    Completion
    PRE_TOOL_CALL
    PreToolCall
    POST_TOOL_CALL
    PostToolCall
    PRE_RUN
    PreRun
    POST_RUN
    PostRun
    "Prompt"
    Prompt
    "Completion"
    Completion
    "PreToolCall"
    PreToolCall
    "PostToolCall"
    PostToolCall
    "PreRun"
    PreRun
    "PostRun"
    PostRun

    RaiPolicyMode, RaiPolicyModeArgs

    Default
    Default
    Deferred
    Deferred
    Blocking
    Blocking
    Asynchronous_filter
    Asynchronous_filter
    RaiPolicyModeDefault
    Default
    RaiPolicyModeDeferred
    Deferred
    RaiPolicyModeBlocking
    Blocking
    RaiPolicyMode_Asynchronous_filter
    Asynchronous_filter
    Default
    Default
    Deferred
    Deferred
    Blocking
    Blocking
    Asynchronous_filter
    Asynchronous_filter
    Default
    Default
    Deferred
    Deferred
    Blocking
    Blocking
    Asynchronous_filter
    Asynchronous_filter
    DEFAULT
    Default
    DEFERRED
    Deferred
    BLOCKING
    Blocking
    ASYNCHRONOUS_FILTER
    Asynchronous_filter
    "Default"
    Default
    "Deferred"
    Deferred
    "Blocking"
    Blocking
    "Asynchronous_filter"
    Asynchronous_filter

    RaiPolicyProperties, RaiPolicyPropertiesArgs

    Azure OpenAI Content Filters properties.
    BasePolicyName string
    Name of Rai policy.
    ContentFilters List<Pulumi.AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilter>
    The list of Content Filters.
    CustomBlocklists List<Pulumi.AzureNative.CognitiveServices.Inputs.CustomBlocklistConfig>
    The list of custom Blocklist.
    CustomTopics List<Pulumi.AzureNative.CognitiveServices.Inputs.CustomTopicConfig>
    The list of custom rai topics.
    Mode string | Pulumi.AzureNative.CognitiveServices.RaiPolicyMode
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    SafetyProviders List<Pulumi.AzureNative.CognitiveServices.Inputs.SafetyProviderConfig>
    The list of Safety Providers.
    BasePolicyName string
    Name of Rai policy.
    ContentFilters []RaiPolicyContentFilter
    The list of Content Filters.
    CustomBlocklists []CustomBlocklistConfig
    The list of custom Blocklist.
    CustomTopics []CustomTopicConfig
    The list of custom rai topics.
    Mode string | RaiPolicyMode
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    SafetyProviders []SafetyProviderConfig
    The list of Safety Providers.
    basePolicyName String
    Name of Rai policy.
    contentFilters List<RaiPolicyContentFilter>
    The list of Content Filters.
    customBlocklists List<CustomBlocklistConfig>
    The list of custom Blocklist.
    customTopics List<CustomTopicConfig>
    The list of custom rai topics.
    mode String | RaiPolicyMode
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safetyProviders List<SafetyProviderConfig>
    The list of Safety Providers.
    basePolicyName string
    Name of Rai policy.
    contentFilters RaiPolicyContentFilter[]
    The list of Content Filters.
    customBlocklists CustomBlocklistConfig[]
    The list of custom Blocklist.
    customTopics CustomTopicConfig[]
    The list of custom rai topics.
    mode string | RaiPolicyMode
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safetyProviders SafetyProviderConfig[]
    The list of Safety Providers.
    base_policy_name str
    Name of Rai policy.
    content_filters Sequence[RaiPolicyContentFilter]
    The list of Content Filters.
    custom_blocklists Sequence[CustomBlocklistConfig]
    The list of custom Blocklist.
    custom_topics Sequence[CustomTopicConfig]
    The list of custom rai topics.
    mode str | RaiPolicyMode
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safety_providers Sequence[SafetyProviderConfig]
    The list of Safety Providers.
    basePolicyName String
    Name of Rai policy.
    contentFilters List<Property Map>
    The list of Content Filters.
    customBlocklists List<Property Map>
    The list of custom Blocklist.
    customTopics List<Property Map>
    The list of custom rai topics.
    mode String | "Default" | "Deferred" | "Blocking" | "Asynchronous_filter"
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safetyProviders List<Property Map>
    The list of Safety Providers.

    RaiPolicyPropertiesResponse, RaiPolicyPropertiesResponseArgs

    Azure OpenAI Content Filters properties.
    Type string
    Content Filters policy type.
    BasePolicyName string
    Name of Rai policy.
    ContentFilters List<Pulumi.AzureNative.CognitiveServices.Inputs.RaiPolicyContentFilterResponse>
    The list of Content Filters.
    CustomBlocklists List<Pulumi.AzureNative.CognitiveServices.Inputs.CustomBlocklistConfigResponse>
    The list of custom Blocklist.
    CustomTopics List<Pulumi.AzureNative.CognitiveServices.Inputs.CustomTopicConfigResponse>
    The list of custom rai topics.
    Mode string
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    SafetyProviders List<Pulumi.AzureNative.CognitiveServices.Inputs.SafetyProviderConfigResponse>
    The list of Safety Providers.
    Type string
    Content Filters policy type.
    BasePolicyName string
    Name of Rai policy.
    ContentFilters []RaiPolicyContentFilterResponse
    The list of Content Filters.
    CustomBlocklists []CustomBlocklistConfigResponse
    The list of custom Blocklist.
    CustomTopics []CustomTopicConfigResponse
    The list of custom rai topics.
    Mode string
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    SafetyProviders []SafetyProviderConfigResponse
    The list of Safety Providers.
    type String
    Content Filters policy type.
    basePolicyName String
    Name of Rai policy.
    contentFilters List<RaiPolicyContentFilterResponse>
    The list of Content Filters.
    customBlocklists List<CustomBlocklistConfigResponse>
    The list of custom Blocklist.
    customTopics List<CustomTopicConfigResponse>
    The list of custom rai topics.
    mode String
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safetyProviders List<SafetyProviderConfigResponse>
    The list of Safety Providers.
    type string
    Content Filters policy type.
    basePolicyName string
    Name of Rai policy.
    contentFilters RaiPolicyContentFilterResponse[]
    The list of Content Filters.
    customBlocklists CustomBlocklistConfigResponse[]
    The list of custom Blocklist.
    customTopics CustomTopicConfigResponse[]
    The list of custom rai topics.
    mode string
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safetyProviders SafetyProviderConfigResponse[]
    The list of Safety Providers.
    type str
    Content Filters policy type.
    base_policy_name str
    Name of Rai policy.
    content_filters Sequence[RaiPolicyContentFilterResponse]
    The list of Content Filters.
    custom_blocklists Sequence[CustomBlocklistConfigResponse]
    The list of custom Blocklist.
    custom_topics Sequence[CustomTopicConfigResponse]
    The list of custom rai topics.
    mode str
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safety_providers Sequence[SafetyProviderConfigResponse]
    The list of Safety Providers.
    type String
    Content Filters policy type.
    basePolicyName String
    Name of Rai policy.
    contentFilters List<Property Map>
    The list of Content Filters.
    customBlocklists List<Property Map>
    The list of custom Blocklist.
    customTopics List<Property Map>
    The list of custom rai topics.
    mode String
    Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
    safetyProviders List<Property Map>
    The list of Safety Providers.

    SafetyProviderConfig, SafetyProviderConfigArgs

    Gets or sets the source to which safety providers applies.
    Blocking bool
    If blocking would occur.
    SafetyProviderName string
    Name of RAI Safety Provider.
    Source string | Pulumi.AzureNative.CognitiveServices.RaiPolicyContentSource
    Content source to apply the Content Filters.
    Blocking bool
    If blocking would occur.
    SafetyProviderName string
    Name of RAI Safety Provider.
    Source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    safetyProviderName String
    Name of RAI Safety Provider.
    source String | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking boolean
    If blocking would occur.
    safetyProviderName string
    Name of RAI Safety Provider.
    source string | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking bool
    If blocking would occur.
    safety_provider_name str
    Name of RAI Safety Provider.
    source str | RaiPolicyContentSource
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    safetyProviderName String
    Name of RAI Safety Provider.
    source String | "Prompt" | "Completion" | "PreToolCall" | "PostToolCall" | "PreRun" | "PostRun"
    Content source to apply the Content Filters.

    SafetyProviderConfigResponse, SafetyProviderConfigResponseArgs

    Gets or sets the source to which safety providers applies.
    Blocking bool
    If blocking would occur.
    SafetyProviderName string
    Name of RAI Safety Provider.
    Source string
    Content source to apply the Content Filters.
    Blocking bool
    If blocking would occur.
    SafetyProviderName string
    Name of RAI Safety Provider.
    Source string
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    safetyProviderName String
    Name of RAI Safety Provider.
    source String
    Content source to apply the Content Filters.
    blocking boolean
    If blocking would occur.
    safetyProviderName string
    Name of RAI Safety Provider.
    source string
    Content source to apply the Content Filters.
    blocking bool
    If blocking would occur.
    safety_provider_name str
    Name of RAI Safety Provider.
    source str
    Content source to apply the Content Filters.
    blocking Boolean
    If blocking would occur.
    safetyProviderName String
    Name of RAI Safety Provider.
    source String
    Content source to apply the Content Filters.

    SystemDataResponse, SystemDataResponseArgs

    Metadata pertaining to creation and last modification of the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:cognitiveservices:SubscriptionRaiPolicy raiPolicyName /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/raiPolicy/{raiPolicyName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.13.0 published on Wednesday, Jan 28, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate