We recommend using Azure Native.
azure.cognitive.AccountRaiBlocklist
Explore with Pulumi AI
Manages a Cognitive Account Rai Blocklist.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "Brazil South",
});
const exampleAccount = new azure.cognitive.Account("example", {
name: "example-ca",
location: example.location,
resourceGroupName: example.name,
kind: "OpenAI",
skuName: "S0",
});
const exampleAccountRaiBlocklist = new azure.cognitive.AccountRaiBlocklist("example", {
name: "example-crb",
cognitiveAccountId: exampleAccount.id,
description: "Azure OpenAI Rai Blocklist",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="Brazil South")
example_account = azure.cognitive.Account("example",
name="example-ca",
location=example.location,
resource_group_name=example.name,
kind="OpenAI",
sku_name="S0")
example_account_rai_blocklist = azure.cognitive.AccountRaiBlocklist("example",
name="example-crb",
cognitive_account_id=example_account.id,
description="Azure OpenAI Rai Blocklist")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("Brazil South"),
})
if err != nil {
return err
}
exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
Name: pulumi.String("example-ca"),
Location: example.Location,
ResourceGroupName: example.Name,
Kind: pulumi.String("OpenAI"),
SkuName: pulumi.String("S0"),
})
if err != nil {
return err
}
_, err = cognitive.NewAccountRaiBlocklist(ctx, "example", &cognitive.AccountRaiBlocklistArgs{
Name: pulumi.String("example-crb"),
CognitiveAccountId: exampleAccount.ID(),
Description: pulumi.String("Azure OpenAI Rai Blocklist"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "Brazil South",
});
var exampleAccount = new Azure.Cognitive.Account("example", new()
{
Name = "example-ca",
Location = example.Location,
ResourceGroupName = example.Name,
Kind = "OpenAI",
SkuName = "S0",
});
var exampleAccountRaiBlocklist = new Azure.Cognitive.AccountRaiBlocklist("example", new()
{
Name = "example-crb",
CognitiveAccountId = exampleAccount.Id,
Description = "Azure OpenAI Rai Blocklist",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.cognitive.Account;
import com.pulumi.azure.cognitive.AccountArgs;
import com.pulumi.azure.cognitive.AccountRaiBlocklist;
import com.pulumi.azure.cognitive.AccountRaiBlocklistArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("Brazil South")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("example-ca")
.location(example.location())
.resourceGroupName(example.name())
.kind("OpenAI")
.skuName("S0")
.build());
var exampleAccountRaiBlocklist = new AccountRaiBlocklist("exampleAccountRaiBlocklist", AccountRaiBlocklistArgs.builder()
.name("example-crb")
.cognitiveAccountId(exampleAccount.id())
.description("Azure OpenAI Rai Blocklist")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: Brazil South
exampleAccount:
type: azure:cognitive:Account
name: example
properties:
name: example-ca
location: ${example.location}
resourceGroupName: ${example.name}
kind: OpenAI
skuName: S0
exampleAccountRaiBlocklist:
type: azure:cognitive:AccountRaiBlocklist
name: example
properties:
name: example-crb
cognitiveAccountId: ${exampleAccount.id}
description: Azure OpenAI Rai Blocklist
Create AccountRaiBlocklist Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccountRaiBlocklist(name: string, args: AccountRaiBlocklistArgs, opts?: CustomResourceOptions);
@overload
def AccountRaiBlocklist(resource_name: str,
args: AccountRaiBlocklistArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccountRaiBlocklist(resource_name: str,
opts: Optional[ResourceOptions] = None,
cognitive_account_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None)
func NewAccountRaiBlocklist(ctx *Context, name string, args AccountRaiBlocklistArgs, opts ...ResourceOption) (*AccountRaiBlocklist, error)
public AccountRaiBlocklist(string name, AccountRaiBlocklistArgs args, CustomResourceOptions? opts = null)
public AccountRaiBlocklist(String name, AccountRaiBlocklistArgs args)
public AccountRaiBlocklist(String name, AccountRaiBlocklistArgs args, CustomResourceOptions options)
type: azure:cognitive:AccountRaiBlocklist
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 AccountRaiBlocklistArgs
- 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 AccountRaiBlocklistArgs
- 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 AccountRaiBlocklistArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountRaiBlocklistArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountRaiBlocklistArgs
- 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 accountRaiBlocklistResource = new Azure.Cognitive.AccountRaiBlocklist("accountRaiBlocklistResource", new()
{
CognitiveAccountId = "string",
Description = "string",
Name = "string",
});
example, err := cognitive.NewAccountRaiBlocklist(ctx, "accountRaiBlocklistResource", &cognitive.AccountRaiBlocklistArgs{
CognitiveAccountId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var accountRaiBlocklistResource = new AccountRaiBlocklist("accountRaiBlocklistResource", AccountRaiBlocklistArgs.builder()
.cognitiveAccountId("string")
.description("string")
.name("string")
.build());
account_rai_blocklist_resource = azure.cognitive.AccountRaiBlocklist("accountRaiBlocklistResource",
cognitive_account_id="string",
description="string",
name="string")
const accountRaiBlocklistResource = new azure.cognitive.AccountRaiBlocklist("accountRaiBlocklistResource", {
cognitiveAccountId: "string",
description: "string",
name: "string",
});
type: azure:cognitive:AccountRaiBlocklist
properties:
cognitiveAccountId: string
description: string
name: string
AccountRaiBlocklist 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 AccountRaiBlocklist resource accepts the following input properties:
- Cognitive
Account stringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- Description string
- A short description for the Cognitive Account Rai Blocklist.
- Name string
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- Cognitive
Account stringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- Description string
- A short description for the Cognitive Account Rai Blocklist.
- Name string
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive
Account StringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description String
- A short description for the Cognitive Account Rai Blocklist.
- name String
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive
Account stringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description string
- A short description for the Cognitive Account Rai Blocklist.
- name string
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive_
account_ strid - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description str
- A short description for the Cognitive Account Rai Blocklist.
- name str
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive
Account StringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description String
- A short description for the Cognitive Account Rai Blocklist.
- name String
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccountRaiBlocklist resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AccountRaiBlocklist Resource
Get an existing AccountRaiBlocklist resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountRaiBlocklistState, opts?: CustomResourceOptions): AccountRaiBlocklist
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cognitive_account_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None) -> AccountRaiBlocklist
func GetAccountRaiBlocklist(ctx *Context, name string, id IDInput, state *AccountRaiBlocklistState, opts ...ResourceOption) (*AccountRaiBlocklist, error)
public static AccountRaiBlocklist Get(string name, Input<string> id, AccountRaiBlocklistState? state, CustomResourceOptions? opts = null)
public static AccountRaiBlocklist get(String name, Output<String> id, AccountRaiBlocklistState state, CustomResourceOptions options)
resources: _: type: azure:cognitive:AccountRaiBlocklist get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cognitive
Account stringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- Description string
- A short description for the Cognitive Account Rai Blocklist.
- Name string
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- Cognitive
Account stringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- Description string
- A short description for the Cognitive Account Rai Blocklist.
- Name string
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive
Account StringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description String
- A short description for the Cognitive Account Rai Blocklist.
- name String
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive
Account stringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description string
- A short description for the Cognitive Account Rai Blocklist.
- name string
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive_
account_ strid - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description str
- A short description for the Cognitive Account Rai Blocklist.
- name str
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- cognitive
Account StringId - The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
- description String
- A short description for the Cognitive Account Rai Blocklist.
- name String
- The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
Import
Cognitive Account Rai Blocklist can be imported using the resource id
, e.g.
$ pulumi import azure:cognitive/accountRaiBlocklist:AccountRaiBlocklist example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.CognitiveServices/accounts/account1/raiBlocklists/raiblocklist1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.