import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Cognitive Services Account. * * > **Note:** The Cognitive Services Account manages the resource type for various Azure AI resource implementations, including Azure AI Foundry, Azure OpenAI, Azure Speech, Azure Vision and others. Each service shares the same control plane but exposes a different subset of developer APIs. Azure AI Foundry (kind = `AIServices`) provides the superset of capabilities. For more information, please see [Azure AI Foundry architecture](https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/architecture). * * > **Note:** The Azure Provider will attempt to Purge the Cognitive Services Account during deletion. This feature can be disabled using the `features` block within the `provider` block, see the provider documentation on the features block for more information. * * ## 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: "West Europe", * }); * const exampleAccount = new azure.cognitive.Account("example", { * name: "example-account", * location: example.location, * resourceGroupName: example.name, * kind: "Face", * skuName: "S0", * tags: { * Acceptance: "Test", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.CognitiveServices` - 2025-06-01 * * * `Microsoft.Network` - 2025-01-01 * * ## Import * * Cognitive Service Accounts can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:cognitive/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1 * ``` */ export declare class Account extends pulumi.CustomResource { /** * Get an existing Account 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?: AccountState, opts?: pulumi.CustomResourceOptions): Account; /** * Returns true if the given object is an instance of Account. 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 Account; /** * If `kind` is `TextAnalytics` this specifies the ID of the Search service. */ readonly customQuestionAnsweringSearchServiceId: pulumi.Output; /** * If `kind` is `TextAnalytics` this specifies the key of the Search service. * * > **Note:** `customQuestionAnsweringSearchServiceId` and `customQuestionAnsweringSearchServiceKey` are used for [Custom Question Answering, the renamed version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/custom-question-answering), while `qnaRuntimeEndpoint` is used for [the old version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/overview) */ readonly customQuestionAnsweringSearchServiceKey: pulumi.Output; /** * The subdomain name used for Entra ID token-based authentication. This attribute is required when `networkAcls` is specified. This attribute is also required when using the OpenAI service with libraries which assume the Azure OpenAI endpoint is a subdomain on `https://openai.azure.com/`, eg. `https://.openai.azure.com/`. This can be specified during creation or added later, but once set changing this forces a new resource to be created. * * > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource. Moreover, functionality that requires Entra ID authentication, including Agent service, will not be accessible. */ readonly customSubdomainName: pulumi.Output; /** * A `customerManagedKey` block as documented below. */ readonly customerManagedKey: pulumi.Output; /** * Whether to enable the dynamic throttling for this Cognitive Service Account. This attribute cannot be set when the `kind` is `OpenAI` or `AIServices`. */ readonly dynamicThrottlingEnabled: pulumi.Output; /** * The endpoint used to connect to the Cognitive Service Account. */ readonly endpoint: pulumi.Output; /** * List of FQDNs allowed for the Cognitive Account. */ readonly fqdns: pulumi.Output; /** * An `identity` block as defined below. */ readonly identity: pulumi.Output; /** * Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AIServices`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `ContentSafety`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`, `FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `OpenAI`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`, `TextTranslation` and `WebLM`. Changing this forces a new resource to be created except when upgrading the Cognitive Service Account from `OpenAI` to `AIServices` or rolling back from `AIServices` to `OpenAI`. More information on [upgrade and rollback scenario](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/upgrade-azure-openai?tabs=portal). * * > **Note:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first. * * > **Note:** You must create your first Face, Text Analytics, or Computer Vision resources from the Azure portal to review and acknowledge the terms and conditions. In Azure Portal, the checkbox to accept terms and conditions is only displayed when a US region is selected. More information on [Prerequisites](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites). */ readonly kind: pulumi.Output; /** * Whether local authentication methods is enabled for the Cognitive Account. Defaults to `true`. */ readonly localAuthEnabled: pulumi.Output; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * The Azure AD Client ID (Application ID). This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ readonly metricsAdvisorAadClientId: pulumi.Output; /** * The Azure AD Tenant ID. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ readonly metricsAdvisorAadTenantId: pulumi.Output; /** * The super user of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ readonly metricsAdvisorSuperUserName: pulumi.Output; /** * The website name of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. * * > **Note:** This URL is mandatory if the `kind` is set to `QnAMaker`. */ readonly metricsAdvisorWebsiteName: pulumi.Output; /** * Specifies the name of the Cognitive Service Account. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set. */ readonly networkAcls: pulumi.Output; /** * A `networkInjection` block as defined below. Only applicable if the `kind` is set to `AIServices`. */ readonly networkInjection: pulumi.Output; /** * Whether outbound network access is restricted for the Cognitive Account. Defaults to `false`. */ readonly outboundNetworkAccessRestricted: pulumi.Output; /** * A primary access key which can be used to connect to the Cognitive Service Account. */ readonly primaryAccessKey: pulumi.Output; /** * Whether project management is enabled. Can only be set to `true` when `kind` is set to `AIServices`. Once enabled, disabling `projectManagementEnabled` forces a new resource to be created unless `kind` is set to `OpenAI`. Defaults to `false`. */ readonly projectManagementEnabled: pulumi.Output; /** * Whether public network access is allowed for the Cognitive Account. Defaults to `true`. */ readonly publicNetworkAccessEnabled: pulumi.Output; /** * A URL to link a QnAMaker cognitive account to a QnA runtime. */ readonly qnaRuntimeEndpoint: pulumi.Output; /** * The name of the resource group in which the Cognitive Service Account is created. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The secondary access key which can be used to connect to the Cognitive Service Account. */ readonly secondaryAccessKey: pulumi.Output; /** * Specifies the SKU Name for this Cognitive Service Account. Possible values are `C2`, `C3`, `C4`, `D3`, `DC0`, `E0`, `F0`, `F1`, `P0`, `P1`, `P2`, `S`, `S0`, `S1`, `S2`, `S3`, `S4`, `S5` and `S6`. * * > **Note:** SKU `DC0` is the commitment tier for Cognitive Services containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments). */ readonly skuName: pulumi.Output; /** * A `storage` block as defined below. */ readonly storages: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a Account 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: AccountArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Account resources. */ export interface AccountState { /** * If `kind` is `TextAnalytics` this specifies the ID of the Search service. */ customQuestionAnsweringSearchServiceId?: pulumi.Input; /** * If `kind` is `TextAnalytics` this specifies the key of the Search service. * * > **Note:** `customQuestionAnsweringSearchServiceId` and `customQuestionAnsweringSearchServiceKey` are used for [Custom Question Answering, the renamed version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/custom-question-answering), while `qnaRuntimeEndpoint` is used for [the old version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/overview) */ customQuestionAnsweringSearchServiceKey?: pulumi.Input; /** * The subdomain name used for Entra ID token-based authentication. This attribute is required when `networkAcls` is specified. This attribute is also required when using the OpenAI service with libraries which assume the Azure OpenAI endpoint is a subdomain on `https://openai.azure.com/`, eg. `https://.openai.azure.com/`. This can be specified during creation or added later, but once set changing this forces a new resource to be created. * * > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource. Moreover, functionality that requires Entra ID authentication, including Agent service, will not be accessible. */ customSubdomainName?: pulumi.Input; /** * A `customerManagedKey` block as documented below. */ customerManagedKey?: pulumi.Input; /** * Whether to enable the dynamic throttling for this Cognitive Service Account. This attribute cannot be set when the `kind` is `OpenAI` or `AIServices`. */ dynamicThrottlingEnabled?: pulumi.Input; /** * The endpoint used to connect to the Cognitive Service Account. */ endpoint?: pulumi.Input; /** * List of FQDNs allowed for the Cognitive Account. */ fqdns?: pulumi.Input[]>; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AIServices`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `ContentSafety`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`, `FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `OpenAI`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`, `TextTranslation` and `WebLM`. Changing this forces a new resource to be created except when upgrading the Cognitive Service Account from `OpenAI` to `AIServices` or rolling back from `AIServices` to `OpenAI`. More information on [upgrade and rollback scenario](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/upgrade-azure-openai?tabs=portal). * * > **Note:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first. * * > **Note:** You must create your first Face, Text Analytics, or Computer Vision resources from the Azure portal to review and acknowledge the terms and conditions. In Azure Portal, the checkbox to accept terms and conditions is only displayed when a US region is selected. More information on [Prerequisites](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites). */ kind?: pulumi.Input; /** * Whether local authentication methods is enabled for the Cognitive Account. Defaults to `true`. */ localAuthEnabled?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The Azure AD Client ID (Application ID). This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ metricsAdvisorAadClientId?: pulumi.Input; /** * The Azure AD Tenant ID. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ metricsAdvisorAadTenantId?: pulumi.Input; /** * The super user of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ metricsAdvisorSuperUserName?: pulumi.Input; /** * The website name of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. * * > **Note:** This URL is mandatory if the `kind` is set to `QnAMaker`. */ metricsAdvisorWebsiteName?: pulumi.Input; /** * Specifies the name of the Cognitive Service Account. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set. */ networkAcls?: pulumi.Input; /** * A `networkInjection` block as defined below. Only applicable if the `kind` is set to `AIServices`. */ networkInjection?: pulumi.Input; /** * Whether outbound network access is restricted for the Cognitive Account. Defaults to `false`. */ outboundNetworkAccessRestricted?: pulumi.Input; /** * A primary access key which can be used to connect to the Cognitive Service Account. */ primaryAccessKey?: pulumi.Input; /** * Whether project management is enabled. Can only be set to `true` when `kind` is set to `AIServices`. Once enabled, disabling `projectManagementEnabled` forces a new resource to be created unless `kind` is set to `OpenAI`. Defaults to `false`. */ projectManagementEnabled?: pulumi.Input; /** * Whether public network access is allowed for the Cognitive Account. Defaults to `true`. */ publicNetworkAccessEnabled?: pulumi.Input; /** * A URL to link a QnAMaker cognitive account to a QnA runtime. */ qnaRuntimeEndpoint?: pulumi.Input; /** * The name of the resource group in which the Cognitive Service Account is created. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The secondary access key which can be used to connect to the Cognitive Service Account. */ secondaryAccessKey?: pulumi.Input; /** * Specifies the SKU Name for this Cognitive Service Account. Possible values are `C2`, `C3`, `C4`, `D3`, `DC0`, `E0`, `F0`, `F1`, `P0`, `P1`, `P2`, `S`, `S0`, `S1`, `S2`, `S3`, `S4`, `S5` and `S6`. * * > **Note:** SKU `DC0` is the commitment tier for Cognitive Services containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments). */ skuName?: pulumi.Input; /** * A `storage` block as defined below. */ storages?: 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 Account resource. */ export interface AccountArgs { /** * If `kind` is `TextAnalytics` this specifies the ID of the Search service. */ customQuestionAnsweringSearchServiceId?: pulumi.Input; /** * If `kind` is `TextAnalytics` this specifies the key of the Search service. * * > **Note:** `customQuestionAnsweringSearchServiceId` and `customQuestionAnsweringSearchServiceKey` are used for [Custom Question Answering, the renamed version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/custom-question-answering), while `qnaRuntimeEndpoint` is used for [the old version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/overview) */ customQuestionAnsweringSearchServiceKey?: pulumi.Input; /** * The subdomain name used for Entra ID token-based authentication. This attribute is required when `networkAcls` is specified. This attribute is also required when using the OpenAI service with libraries which assume the Azure OpenAI endpoint is a subdomain on `https://openai.azure.com/`, eg. `https://.openai.azure.com/`. This can be specified during creation or added later, but once set changing this forces a new resource to be created. * * > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource. Moreover, functionality that requires Entra ID authentication, including Agent service, will not be accessible. */ customSubdomainName?: pulumi.Input; /** * A `customerManagedKey` block as documented below. */ customerManagedKey?: pulumi.Input; /** * Whether to enable the dynamic throttling for this Cognitive Service Account. This attribute cannot be set when the `kind` is `OpenAI` or `AIServices`. */ dynamicThrottlingEnabled?: pulumi.Input; /** * List of FQDNs allowed for the Cognitive Account. */ fqdns?: pulumi.Input[]>; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AIServices`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `ContentSafety`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`, `FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `OpenAI`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`, `TextTranslation` and `WebLM`. Changing this forces a new resource to be created except when upgrading the Cognitive Service Account from `OpenAI` to `AIServices` or rolling back from `AIServices` to `OpenAI`. More information on [upgrade and rollback scenario](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/upgrade-azure-openai?tabs=portal). * * > **Note:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first. * * > **Note:** You must create your first Face, Text Analytics, or Computer Vision resources from the Azure portal to review and acknowledge the terms and conditions. In Azure Portal, the checkbox to accept terms and conditions is only displayed when a US region is selected. More information on [Prerequisites](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites). */ kind: pulumi.Input; /** * Whether local authentication methods is enabled for the Cognitive Account. Defaults to `true`. */ localAuthEnabled?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The Azure AD Client ID (Application ID). This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ metricsAdvisorAadClientId?: pulumi.Input; /** * The Azure AD Tenant ID. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ metricsAdvisorAadTenantId?: pulumi.Input; /** * The super user of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. */ metricsAdvisorSuperUserName?: pulumi.Input; /** * The website name of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created. * * > **Note:** This URL is mandatory if the `kind` is set to `QnAMaker`. */ metricsAdvisorWebsiteName?: pulumi.Input; /** * Specifies the name of the Cognitive Service Account. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set. */ networkAcls?: pulumi.Input; /** * A `networkInjection` block as defined below. Only applicable if the `kind` is set to `AIServices`. */ networkInjection?: pulumi.Input; /** * Whether outbound network access is restricted for the Cognitive Account. Defaults to `false`. */ outboundNetworkAccessRestricted?: pulumi.Input; /** * Whether project management is enabled. Can only be set to `true` when `kind` is set to `AIServices`. Once enabled, disabling `projectManagementEnabled` forces a new resource to be created unless `kind` is set to `OpenAI`. Defaults to `false`. */ projectManagementEnabled?: pulumi.Input; /** * Whether public network access is allowed for the Cognitive Account. Defaults to `true`. */ publicNetworkAccessEnabled?: pulumi.Input; /** * A URL to link a QnAMaker cognitive account to a QnA runtime. */ qnaRuntimeEndpoint?: pulumi.Input; /** * The name of the resource group in which the Cognitive Service Account is created. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * Specifies the SKU Name for this Cognitive Service Account. Possible values are `C2`, `C3`, `C4`, `D3`, `DC0`, `E0`, `F0`, `F1`, `P0`, `P1`, `P2`, `S`, `S0`, `S1`, `S2`, `S3`, `S4`, `S5` and `S6`. * * > **Note:** SKU `DC0` is the commitment tier for Cognitive Services containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments). */ skuName: pulumi.Input; /** * A `storage` block as defined below. */ storages?: pulumi.Input[]>; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }