Service | Microsoft Docs article | Related commit history on GitHub | Change details |
---|---|---|---|
active-directory-b2c | Custom Policy Developer Notes | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/active-directory-b2c/custom-policy-developer-notes.md | Azure Active Directory B2C [user flows and custom policies](user-flow-overview.m - Support requests for public preview features can be submitted through regular support channels. ## User flows- |Feature |User flow |Custom policy |Notes | ||::|::|| | [Sign-up and sign-in](add-sign-up-and-sign-in-policy.md) with email and password. | GA | GA| | Azure Active Directory B2C [user flows and custom policies](user-flow-overview.m | [Profile editing flow](add-profile-editing-policy.md) | GA | GA | | | [Self-Service password reset](add-password-reset-policy.md) | GA| GA| | | [Force password reset](force-password-reset.md) | GA | NA | |-| [Phone sign-up and sign-in](phone-authentication-user-flows.md) | GA | GA | | -| [Conditional Access and Identity Protection](conditional-access-user-flow.md) | GA | GA | Not available for SAML applications | +| [Self-Service password reset](add-password-reset-policy.md) | GA| GA| Available in China cloud, but only for custom policies. +| [Force password reset](force-password-reset.md) | GA | GA | Available in China cloud, but only for custom policies. | +| [Phone sign-up and sign-in](phone-authentication-user-flows.md) | GA | GA | Available in China cloud, but only for custom policies. | | [Smart lockout](threat-management.md) | GA | GA | |+| [Conditional Access and Identity Protection](conditional-access-user-flow.md) | GA | GA | Not available for SAML applications. Limited CA features are available in China cloud. Identity Protection is not available in China cloud. | | [CAPTCHA](add-captcha.md) | Preview | Preview | You can enable it during sign-up or sign-in for Local accounts. | ## OAuth 2.0 application authorization flows The following table summarizes the Security Assertion Markup Language (SAML) app |Feature |User flow |Custom policy |Notes | ||::|::||-| [Multi-language support](localization.md)| GA | GA | | -| [Custom domains](custom-domain.md)| GA | GA | | +| [Multi-language support](localization.md)| GA | GA | Available in China cloud, but only for custom policies. | +| [Custom domains](custom-domain.md)| GA | GA | Available in China cloud, but only for custom policies. | | [Custom email verification](custom-email-mailjet.md) | NA | GA| | | [Customize the user interface with built-in templates](customize-ui.md) | GA| GA| | | [Customize the user interface with custom templates](customize-ui-with-html.md) | GA| GA| By using HTML templates. |-| [Page layout version](page-layout.md) | GA | GA | | -| [JavaScript](javascript-and-page-layout.md) | GA | GA | | +| [Page layout version](page-layout.md) | GA | GA | Available in China cloud, but only for custom policies. | +| [JavaScript](javascript-and-page-layout.md) | GA | GA | Available in China cloud, but only for custom policies. | | [Embedded sign-in experience](embedded-login.md) | NA | Preview| By using the inline frame element `<iframe>`. |-| [Password complexity](password-complexity.md) | GA | GA | | +| [Password complexity](password-complexity.md) | GA | GA | Available in China cloud, but only for custom policies. | | [Disable email verification](disable-email-verification.md) | GA| GA| Not recommended for production environments. Disabling email verification in the sign-up process may lead to spam. | The following table summarizes the Security Assertion Markup Language (SAML) app ||::|::|| |[AD FS](identity-provider-adfs.md) | NA | GA | | |[Amazon](identity-provider-amazon.md) | GA | GA | |-|[Apple](identity-provider-apple-id.md) | GA | GA | | +|[Apple](identity-provider-apple-id.md) | GA | GA | Available in China cloud, but only for custom policies. | |[Microsoft Entra ID (Single-tenant)](identity-provider-azure-ad-single-tenant.md) | GA | GA | | |[Microsoft Entra ID (multitenant)](identity-provider-azure-ad-multi-tenant.md) | NA | GA | | |[Azure AD B2C](identity-provider-azure-ad-b2c.md) | GA | GA | | The following table summarizes the Security Assertion Markup Language (SAML) app |[Salesforce](identity-provider-salesforce.md) | GA | GA | | |[Salesforce (SAML protocol)](identity-provider-salesforce-saml.md) | NA | GA | | |[Twitter](identity-provider-twitter.md) | GA | GA | |-|[WeChat](identity-provider-wechat.md) | Preview | GA | | +|[WeChat](identity-provider-wechat.md) | Preview | GA | Available in China cloud, but only for custom policies. | |[Weibo](identity-provider-weibo.md) | Preview | GA | | ## Generic identity providers The following table summarizes the Security Assertion Markup Language (SAML) app | Feature | Custom policy | Notes | | - | :--: | -- |-| [Default SSO session provider](custom-policy-reference-sso.md#defaultssosessionprovider) | GA | | -| [External login session provider](custom-policy-reference-sso.md#externalloginssosessionprovider) | GA | | -| [SAML SSO session provider](custom-policy-reference-sso.md#samlssosessionprovider) | GA | | -| [OAuth SSO Session Provider](custom-policy-reference-sso.md#oauthssosessionprovider) | GA| | +| [Default SSO session provider](custom-policy-reference-sso.md#defaultssosessionprovider) | GA | Available in China cloud, but only for custom policies. | +| [External login session provider](custom-policy-reference-sso.md#externalloginssosessionprovider) | GA | Available in China cloud, but only for custom policies. | +| [SAML SSO session provider](custom-policy-reference-sso.md#samlssosessionprovider) | GA | Available in China cloud, but only for custom policies. | +| [OAuth SSO Session Provider](custom-policy-reference-sso.md#oauthssosessionprovider) | GA| Available in China cloud, but only for custom policies. | ### Components The following table summarizes the Security Assertion Markup Language (SAML) app | Feature | Custom policy | Notes | | - | :--: | -- | | [MFA using time-based one-time password (TOTP) with authenticator apps](multi-factor-authentication.md#verification-methods) | GA | Users can use any authenticator app that supports TOTP verification, such as the [Microsoft Authenticator app](https://www.microsoft.com/security/mobile-authenticator-app).|-| [Phone factor authentication](phone-factor-technical-profile.md) | GA | | +| [Phone factor authentication](phone-factor-technical-profile.md) | GA | Available in China cloud, but only for custom policies. | | [Microsoft Entra multifactor authentication authentication](multi-factor-auth-technical-profile.md) | GA | | | [One-time password](one-time-password-technical-profile.md) | GA | | | [Microsoft Entra ID](active-directory-technical-profile.md) as local directory | GA | | |
advisor | Advisor Resiliency Reviews | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/advisor/advisor-resiliency-reviews.md | You can manage access to Advisor personalized recommendations using the followin | **Name** | **Description** | ||::| |Subscription Reader|View reviews for a workload and recommendations linked to them.|-|Subscription Owner<br>Subscription Contributor|View reviews for a workload, triage recommendations linked to those reviews, manage review recommendation lifecycle.| -|Advisor Recommendations Contributor (Assessments and Reviews)|View review recommendations, accept review recommendations, manage review recommendations' lifecycle.| +|Subscription Owner<br>Subscription Contributor|View reviews for a workload, triage recommendations linked to those reviews, manage the recommendation lifecycle.| +|Advisor Recommendations Contributor (Assessments and Reviews)|View accepted recommendations, and manage the recommendation lifecycle.| You can find detailed instructions on how to assign a role using the Azure portal - [Assign Azure roles using the Azure portal - Azure RBAC](/azure/role-based-access-control/role-assignments-portal?tabs=delegate-condition). Additional information is available in [Steps to assign an Azure role - Azure RBAC](/azure/role-based-access-control/role-assignments-steps). |
ai-services | Cognitive Services Virtual Networks | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/cognitive-services-virtual-networks.md | Virtual networks are supported in [regions where Azure AI services are available > - `CognitiveServicesManagement` > - `CognitiveServicesFrontEnd` > - `Storage` (Speech Studio only)+> +> For information on configuring Azure AI Studio, see the [Azure AI Studio documentation](../ai-studio/how-to/configure-private-link.md). ## Change the default network access rule |
ai-services | Groundedness | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/content-safety/concepts/groundedness.md | To use this API, you must create your Azure AI Content Safety resource in the su | Pricing Tier | Requests per 10 seconds | | :-- | : |-| F0 | 10 | -| S0 | 10 | +| F0 | 50 | +| S0 | 50 | If you need a higher rate, [contact us](mailto:contentsafetysupport@microsoft.com) to request it. |
ai-services | Quickstart Groundedness | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/content-safety/quickstart-groundedness.md | Follow this guide to use Azure AI Content Safety Groundedness detection to check ## Check groundedness without reasoning -In the simple case without the _reasoning_ feature, the Groundedness detection API classifies the ungroundedness of the submitted content as `true` or `false` and provides a confidence score. +In the simple case without the _reasoning_ feature, the Groundedness detection API classifies the ungroundedness of the submitted content as `true` or `false`. #### [cURL](#tab/curl) Create a new Python file named _quickstart.py_. Open the new file in your prefer -> [!TIP] -> To test a summarization task instead of a question answering (QnA) task, use the following sample JSON body: -> -> ```json -> { -> "Domain": "Medical", -> "Task": "Summarization", -> "Text": "Ms Johnson has been in the hospital after experiencing a stroke.", -> "GroundingSources": ["Our patient, Ms. Johnson, presented with persistent fatigue, unexplained weight loss, and frequent night sweats. After a series of tests, she was diagnosed with HodgkinΓÇÖs lymphoma, a type of cancer that affects the lymphatic system. The diagnosis was confirmed through a lymph node biopsy revealing the presence of Reed-Sternberg cells, a characteristic of this disease. She was further staged using PET-CT scans. Her treatment plan includes chemotherapy and possibly radiation therapy, depending on her response to treatment. The medical team remains optimistic about her prognosis given the high cure rate of HodgkinΓÇÖs lymphoma."], -> "Reasoning": false -> } -> ``` +To test a summarization task instead of a question answering (QnA) task, use the following sample JSON body: +```json +{ + "domain": "Medical", + "task": "Summarization", + "text": "Ms Johnson has been in the hospital after experiencing a stroke.", + "groundingSources": ["Our patient, Ms. Johnson, presented with persistent fatigue, unexplained weight loss, and frequent night sweats. After a series of tests, she was diagnosed with HodgkinΓÇÖs lymphoma, a type of cancer that affects the lymphatic system. The diagnosis was confirmed through a lymph node biopsy revealing the presence of Reed-Sternberg cells, a characteristic of this disease. She was further staged using PET-CT scans. Her treatment plan includes chemotherapy and possibly radiation therapy, depending on her response to treatment. The medical team remains optimistic about her prognosis given the high cure rate of HodgkinΓÇÖs lymphoma."], + "reasoning": false +} +``` The following fields must be included in the URL: The parameters in the request body are defined in this table: | - `query` | (Optional) This represents the question in a QnA task. Character limit: 7,500. | String | | **text** | (Required) The LLM output text to be checked. Character limit: 7,500. | String | | **groundingSources** | (Required) Uses an array of grounding sources to validate AI-generated text. Up to 55,000 characters of grounding sources can be analyzed in a single request. | String array |-| **reasoning** | (Optional) Specifies whether to use the reasoning feature. The default value is `false`. If `true`, you need to bring your own Azure OpenAI resources to provide an explanation. Be careful: using reasoning increases the processing time and incurs extra fees.| Boolean | +| **reasoning** | (Optional) Specifies whether to use the reasoning feature. The default value is `false`. If `true`, you need to bring your own Azure OpenAI GPT-4 Turbo resources to provide an explanation. Be careful: using reasoning increases the processing time.| Boolean | ### Interpret the API response The JSON objects in the output are defined here: | Name | Description | Type | | : | :-- | - | | **ungroundedDetected** | Indicates whether the text exhibits ungroundedness. | Boolean |-| **confidenceScore** | The confidence value of the _ungrounded_ designation. The score ranges from 0 to 1. | Float | | **ungroundedPercentage** | Specifies the proportion of the text identified as ungrounded, expressed as a number between 0 and 1, where 0 indicates no ungrounded content and 1 indicates entirely ungrounded content.| Float | | **ungroundedDetails** | Provides insights into ungrounded content with specific examples and percentages.| Array |-| -**`Text`** | The specific text that is ungrounded. | String | +| -**`text`** | The specific text that is ungrounded. | String | ## Check groundedness with reasoning The Groundedness detection API provides the option to include _reasoning_ in the ### Bring your own GPT deployment -In order to use your Azure OpenAI resource to enable the reasoning feature, use Managed Identity to allow your Content Safety resource to access the Azure OpenAI resource: +> [!TIP] +> At the moment, we only support **Azure OpenAI GPT-4 Turbo** resources and do not support other GPT types. Your GPT-4 Turbo resources can be deployed in any region; however, we recommend that they be located in the same region as the content safety resources to minimize potential latency. ++In order to use your Azure OpenAI GPT4-Turbo resource to enable the reasoning feature, use Managed Identity to allow your Content Safety resource to access the Azure OpenAI resource: 1. Enable Managed Identity for Azure AI Content Safety. In order to use your Azure OpenAI resource to enable the reasoning feature, use ### Make the API request -In your request to the Groundedness detection API, set the `"Reasoning"` body parameter to `true`, and provide the other needed parameters: +In your request to the Groundedness detection API, set the `"reasoning"` body parameter to `true`, and provide the other needed parameters: ```json { The parameters in the request body are defined in this table: | **text** | (Required) The LLM output text to be checked. Character limit: 7,500. | String | | **groundingSources** | (Required) Uses an array of grounding sources to validate AI-generated text. Up to 55,000 characters of grounding sources can be analyzed in a single request. | String array | | **reasoning** | (Optional) Set to `true`, the service uses Azure OpenAI resources to provide an explanation. Be careful: using reasoning increases the processing time and incurs extra fees.| Boolean |-| **llmResource** | (Optional) If you want to use your own Azure OpenAI resources instead of our default GPT resources, add this field and include the subfields for the resources used. If you don't want to use your own resources, remove this field from the input. | String | -| - `resourceType `| Specifies the type of resource being used. Currently it only allows `AzureOpenAI`. | Enum| +| **llmResource** | (Required) If you want to use your own Azure OpenAI GPT4-Turbo resource to enable reasoning, add this field and include the subfields for the resources used. | String | +| - `resourceType `| Specifies the type of resource being used. Currently it only allows `AzureOpenAI`. We only support Azure OpenAI GPT-4 Turbo resources and do not support other GPT types. Your GPT-4 Turbo resources can be deployed in any region; however, we recommend that they be located in the same region as the content safety resources to minimize potential latency. | Enum| | - `azureOpenAIEndpoint `| Your endpoint URL for Azure OpenAI service. | String | | - `azureOpenAIDeploymentName` | The name of the specific GPT deployment to use. | String| The JSON objects in the output are defined here: | Name | Description | Type | | : | :-- | - | | **ungroundedDetected** | Indicates whether the text exhibits ungroundedness. | Boolean |-| **confidenceScore** | The confidence value of the _ungrounded_ designation. The score ranges from 0 to 1. | Float | | **ungroundedPercentage** | Specifies the proportion of the text identified as ungrounded, expressed as a number between 0 and 1, where 0 indicates no ungrounded content and 1 indicates entirely ungrounded content.| Float | | **ungroundedDetails** | Provides insights into ungrounded content with specific examples and percentages.| Array |-| -**`Text`** | The specific text that is ungrounded. | String | +| -**`text`** | The specific text that is ungrounded. | String | | -**`offset`** | An object describing the position of the ungrounded text in various encoding. | String | | - `offset > utf8` | The offset position of the ungrounded text in UTF-8 encoding. | Integer | | - `offset > utf16` | The offset position of the ungrounded text in UTF-16 encoding. | Integer | The JSON objects in the output are defined here: | - `length > utf8` | The length of the ungrounded text in UTF-8 encoding. | Integer | | - `length > utf16` | The length of the ungrounded text in UTF-16 encoding. | Integer | | - `length > codePoint` | The length of the ungrounded text in terms of Unicode code points. |Integer |-| -**`Reason`** | Offers explanations for detected ungroundedness. | String | +| -**`reason`** | Offers explanations for detected ungroundedness. | String | ## Clean up resources |
ai-services | Quickstart | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/language-detection/quickstart.md | If you want to clean up and remove an Azure AI services subscription, you can de * [Portal](../../multi-service-resource.md?pivots=azportal#clean-up-resources) * [Azure CLI](../../multi-service-resource.md?pivots=azcli#clean-up-resources) -- ## Next steps -* [Language detection overview](overview.md) +* [Language detection overview](overview.md) |
ai-services | Entity Resolutions | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/named-entity-recognition/concepts/entity-resolutions.md | -You can use NER resolutions to implement actions or retrieve further information. For example, your service can extract datetime entities to extract dates and times that will be provided to a meeting scheduling system. +You can use NER resolutions to implement actions or retrieve further information. For example, your service can extract datetime entities to extract dates and times that will be provided to a meeting scheduling system. ++> [!IMPORTANT] +> Starting from version 2023-04-15-preview, the entity resolution feature is replaced by [entity metadata](entity-metadata.md) > [!NOTE] > Entity resolution responses are only supported starting from **_api-version=2022-10-01-preview_** and **_"modelVersion": "2022-10-01-preview"_**. + This article documents the resolution objects returned for each entity category or subcategory. ## Age |
ai-services | Ga Preview Mapping | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/named-entity-recognition/concepts/ga-preview-mapping.md | -Use this article to get an overview of the new API changes starting from `2023-04-15-preview` version. This API change mainly introduces two new concepts (`entity types` and `entity tags`) replacing the `category` and `subcategory` fields in the current Generally Available API. +Use this article to get an overview of the new API changes starting from `2023-04-15-preview` version. This API change mainly introduces two new concepts (`entity types` and `entity tags`) replacing the `category` and `subcategory` fields in the current Generally Available API. A detailed overview of each API parameter and the supported API versions it corresponds to can be found on the [Skill Parameters][../how-to/skill-parameters.md] page ## Entity types Entity types represent the lowest (or finest) granularity at which the entity has been detected and can be considered to be the base class that has been detected. Entity types represent the lowest (or finest) granularity at which the entity ha Entity tags are used to further identify an entity where a detected entity is tagged by the entity type and additional tags to differentiate the identified entity. The entity tags list could be considered to include categories, subcategories, sub-subcategories, and so on. ## Changes from generally available API to preview API-The changes introduce better flexibility for named entity recognition, including: -* More granular entity recognition through introducing the tags list where an entity could be tagged by more than one entity tag. +The changes introduce better flexibility for the named entity recognition service, including: ++Updates to the structure of input formats: +ΓÇó InclusionList +ΓÇó ExclusionList +ΓÇó Overlap policy ++Updates to the handling of output formats: ++* More granular entity recognition outputs through introducing the tags list where an entity could be tagged by more than one entity tag. * Overlapping entities where entities could be recognized as more than one entity type and if so, this entity would be returned twice. If an entity was recognized to belong to two entity tags under the same entity type, both entity tags are returned in the tags list. * Filtering entities using entity tags, you can learn more about this by navigating to [this article](../how-to-call.md#select-which-entities-to-be-returned-preview-api-only). * Metadata Objects which contain additional information about the entity but currently only act as a wrapper for the existing entity resolution feature. You can learn more about this new feature [here](entity-metadata.md). You can see a comparison between the structure of the entity categories/types in | Age | Numeric, Age | | Currency | Numeric, Currency | | Number | Numeric, Number |+| PhoneNumber | PhoneNumber | | NumberRange | Numeric, NumberRange | | Percentage | Numeric, Percentage | | Ordinal | Numeric, Ordinal |-| Temperature | Numeric, Dimension, Temperature | -| Speed | Numeric, Dimension, Speed | -| Weight | Numeric, Dimension, Weight | -| Height | Numeric, Dimension, Height | -| Length | Numeric, Dimension, Length | -| Volume | Numeric, Dimension, Volume | -| Area | Numeric, Dimension, Area | -| Information | Numeric, Dimension, Information | +| Temperature | Numeric, Dimension, Temperature | +| Speed | Numeric, Dimension, Speed | +| Weight | Numeric, Dimension, Weight | +| Height | Numeric, Dimension, Height | +| Length | Numeric, Dimension, Length | +| Volume | Numeric, Dimension, Volume | +| Area | Numeric, Dimension, Area | +| Information | Numeric, Dimension, Information | | Address | Address | | Person | Person | | PersonType | PersonType | | Organization | Organization | | Product | Product |-| ComputingProduct | Product, ComputingProduct | +| ComputingProduct | Product, ComputingProduct | | IP | IP | | Email | Email | | URL | URL | |
ai-services | Skill Parameters | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/named-entity-recognition/how-to/skill-parameters.md | + + Title: Named entity recognition skill parameters ++description: Learn about skill parameters for named entity recognition. +# +++++ Last updated : 03/21/2024++++# Learn about named entity recognition skill parameters ++Use this article to get an overview of the different API parameters used to adjust the input to a NER API call. ++## InclusionList parameter ++The ΓÇ£inclusionListΓÇ¥ parameter allows for you to specify which of the NER entity tags, listed here [link to Preview API table], you would like included in the entity list output in your inference JSON listing out all words and categorizations recognized by the NER service. By default, all recognized entities will be listed. ++## ExclusionList parameter ++The ΓÇ£exclusionListΓÇ¥ parameter allows for you to specify which of the NER entity tags, listed here [link to Preview API table], you would like excluded in the entity list output in your inference JSON listing out all words and categorizations recognized by the NER service. By default, all recognized entities will be listed. ++## Example ++To do: work with Bidisha & Mikael to update with a good example ++## overlapPolicy parameter ++The ΓÇ£overlapPolicyΓÇ¥ parameter allows for you to specify how you like the NER service to respond to recognized words/phrases that fall into more than one category. ++By default, the overlapPolicy parameter will be set to ΓÇ£matchLongestΓÇ¥. This option will categorize the extracted word/phrase under the entity category that can encompass the longest span of the extracted word/phrase (longest defined by the most number of characters included). ++The alternative option for this parameter is ΓÇ£allowOverlapΓÇ¥, where all possible entity categories will be listed. +Parameters by supported API version ++|Parameter |API versions which support | +||--| +|inclusionList |2023-04-15-preview, 2023-11-15-preview| +|exclusionList |2023-04-15-preview, 2023-11-15-preview| +|Overlap policy |2023-04-15-preview, 2023-11-15-preview| +|[Entity resolution](link to archived Entity Resolution page)|2022-10-01-preview | ++## Next steps ++* See [Configure containers](../../concepts/configure-containers.md) for configuration settings. |
ai-services | Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/named-entity-recognition/overview.md | -Named Entity Recognition (NER) is one of the features offered by [Azure AI Language](../overview.md), a collection of machine learning and AI algorithms in the cloud for developing intelligent applications that involve written language. The NER feature can identify and categorize entities in unstructured text. For example: people, places, organizations, and quantities. +Named Entity Recognition (NER) is one of the features offered by [Azure AI Language](../overview.md), a collection of machine learning and AI algorithms in the cloud for developing intelligent applications that involve written language. The NER feature can identify and categorize entities in unstructured text. For example: people, places, organizations, and quantities. The prebuilt NER feature has a pre-set list of [recognized entities](concepts/named-entity-categories.md). The custom NER feature allows you to train the model to recognize specialized entities specific to your use case. * [**Quickstarts**](quickstart.md) are getting-started instructions to guide you through making requests to the service. * [**How-to guides**](how-to-call.md) contain instructions for using the service in more specific or customized ways. * The [**conceptual articles**](concepts/named-entity-categories.md) provide in-depth explanations of the service's functionality and features. +> [!NOTE] +> [Entity Resolution](concepts/entity-resolutions.md) was upgraded to the [Entity Metadata](concepts/entity-metadata.md) starting in API version 2023-04-15-preview. If you are calling the preview version of the API equal or newer than 2023-04-15-preview, please check out the [Entity Metadata](concepts/entity-metadata.md) article to use the resolution feature. ## Get started with named entity recognition |
ai-services | Azure Openai Integration | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/question-answering/how-to/azure-openai-integration.md | At the same time, customers often require a custom answer authoring experience t ## Prerequisites * An existing Azure OpenAI resource. If you don't already have an Azure OpenAI resource, then [create one and deploy a model](../../../openai/how-to/create-resource.md).-* An Azure Language Service resource and custom question qnswering project. If you donΓÇÖt have one already, then [create one](../quickstart/sdk.md). +* An Azure Language Service resource and custom question answering project. If you donΓÇÖt have one already, then [create one](../quickstart/sdk.md). * Azure OpenAI requires registration and is currently only available to approved enterprise customers and partners. See [Limited access to Azure OpenAI Service](/legal/cognitive-services/openai/limited-access?context=/azure/ai-services/openai/context/context) for more information. You can apply for access to Azure OpenAI by completing the form at https://aka.ms/oai/access. Open an issue on this repo to contact us if you have an issue. * Be sure that you are assigned at least the [Cognitive Services OpenAI Contributor role](/azure/role-based-access-control/built-in-roles#cognitive-services-openai-contributor) for the Azure OpenAI resource. At the same time, customers often require a custom answer authoring experience t You can now start exploring Azure OpenAI capabilities with a no-code approach through the chat playground. It's simply a text box where you can submit a prompt to generate a completion. From this page, you can quickly iterate and experiment with the capabilities. You can also launch a [web app](../../../openai/how-to/use-web-app.md) to chat with the model over the web. ## Next steps-* [Using Azure OpenAI on your data](../../../openai/concepts/use-your-data.md) +* [Using Azure OpenAI on your data](../../../openai/concepts/use-your-data.md) |
ai-services | Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/question-answering/overview.md | +> [!NOTE] +> [Azure Open AI On Your Data](../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to Custom Question Answering. If you wish to connect an existing Custom Question Answering project to Azure Open AI On Your Data, please check out our [guide]( how-to/azure-openai-integration.md). + Custom question answering provides cloud-based Natural Language Processing (NLP) that allows you to create a natural conversational layer over your data. It is used to find appropriate answers from customer input or from a project. Custom question answering is commonly used to build conversational client applications, which include social media applications, chat bots, and speech-enabled desktop applications. This offering includes features like enhanced relevance using a deep learning ranker, precise answers, and end-to-end region support. |
ai-services | Sdk | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/language-service/question-answering/quickstart/sdk.md | zone_pivot_groups: custom-qna-quickstart # Quickstart: custom question answering +> [!NOTE] +> [Azure Open AI On Your Data](../../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to Custom Question Answering. If you wish to connect an existing Custom Question Answering project to Azure Open AI On Your Data, please check out our [guide](../how-to/azure-openai-integration.md). + > [!NOTE] > Are you looking to migrate your workloads from QnA Maker? See our [migration guide](../how-to/migrate-qnamaker-to-question-answering.md) for information on feature comparisons and migration steps. |
ai-services | Assistants Quickstart | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/assistants-quickstart.md | Azure OpenAI Assistants (Preview) allows you to create AI assistants tailored to ::: zone-end +++ ::: zone pivot="rest-api" [!INCLUDE [REST API quickstart](includes/assistants-rest.md)] |
ai-services | Customizing Llms | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/concepts/customizing-llms.md | + + Title: Azure OpenAI Service getting started with customizing a large language model (LLM) ++description: Learn more about the concepts behind customizing an LLM with Azure OpenAI. + Last updated : 03/26/2024+++++recommendations: false +++# Getting started with customizing a large language model (LLM) ++There are several techniques for adapting a pre-trained language model to suit a specific task or domain. These include prompt engineering, RAG (Retrieval Augmented Generation), and fine-tuning. These three techniques are not mutually exclusive but are complementary methods that in combination can be applicable to a specific use case. In this article, we'll explore these techniques, illustrative use cases, things to consider, and provide links to resources to learn more and get started with each. ++## Prompt engineering ++### Definition ++[Prompt engineering](./prompt-engineering.md) is a technique that is both art and science, which involves designing prompts for generative AI models. This process utilizes in-context learning ([zero shot and few shot](./prompt-engineering.md#examples)) and, with iteration, improves accuracy and relevancy in responses, optimizing the performance of the model. ++### Illustrative use cases ++A Marketing Manager at an environmentally conscious company can use prompt engineering to help guide the model to generate descriptions that are more aligned with their brandΓÇÖs tone and style. For instance, they can add a prompt like "Write a product description for a new line of eco-friendly cleaning products that emphasizes quality, effectiveness, and highlights the use of environmentally friendly ingredients" to the input. This will help the model generate descriptions that are aligned with their brandΓÇÖs values and messaging. ++### Things to consider ++- **Prompt engineering** is the starting point for generating desired output from generative AI models. ++- **Craft clear instructions**: Instructions are commonly used in prompts and guide the model's behavior. Be specific and leave as little room for interpretation as possible. Use analogies and descriptive language to help the model understand your desired outcome. ++- **Experiment and iterate**: Prompt engineering is an art that requires experimentation and iteration. Practice and gain experience in crafting prompts for different tasks. Every model might behave differently, so it's important to adapt prompt engineering techniques accordingly. ++### Getting started ++- [Introduction to prompt engineering](./prompt-engineering.md) +- [Prompt engineering techniques](./advanced-prompt-engineering.md) +- [15 tips to become a better prompt engineer for generative AI](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/15-tips-to-become-a-better-prompt-engineer-for-generative-ai/ba-p/3882935) +- [The basics of prompt engineering (video)](https://www.youtube.com/watch?v=e7w6QV1NX1c) ++## RAG (Retrieval Augmented Generation) ++### Definition ++[RAG (Retrieval Augmented Generation)](../../../ai-studio/concepts/retrieval-augmented-generation.md) is a method that integrates external data into a Large Language Model prompt to generate relevant responses. This approach is particularly beneficial when using a large corpus of unstructured text based on different topics. It allows for answers to be grounded in the organizationΓÇÖs knowledge base (KB), providing a more tailored and accurate response. ++RAG is also advantageous when answering questions based on an organizationΓÇÖs private data or when the public data that the model was trained on might have become outdated. This helps ensure that the responses are always up-to-date and relevant, regardless of the changes in the data landscape. ++### Illustrative use case ++A corporate HR department is looking to provide an intelligent assistant that answers specific employee health insurance related questions such as "are eyeglasses covered?" RAG is used to ingest the extensive and numerous documents associated with insurance plan policies to enable the answering of these specific types of questions. ++### Things to consider ++- RAG helps ground AI output in real-world data and reduces the likelihood of fabrication. ++- RAG is helpful when there is a need to answer questions based on private proprietary data. ++- RAG is helpful when you might want questions answered that are recent (for example, before the cutoff date of when the [model version](./models.md) was last trained). ++### Getting started ++- [Retrieval Augmented Generation in Azure AI Studio - Azure AI Studio | Microsoft Learn](../../../ai-studio/concepts/retrieval-augmented-generation.md) +- [Retrieval Augmented Generation (RAG) in Azure AI Search](../../../search/retrieval-augmented-generation-overview.md) +- [Retrieval Augmented Generation using Azure Machine Learning prompt flow (preview)](../../../machine-learning/concept-retrieval-augmented-generation.md) ++## Fine-tuning ++### Definition ++[Fine-tuning](../how-to/fine-tuning.md), specifically [supervised fine-tuning](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/fine-tuning-now-available-with-azure-openai-service/ba-p/3954693?lightbox-message-images-3954693=516596iC5D02C785903595A) in this context, is an iterative process that adapts an existing large language model to a provided training set in order to improve performance, teach the model new skills, or reduce latency. This approach is used when the model needs to learn and generalize over specific topics, particularly when these topics are generally small in scope. ++Fine-tuning requires the use of high-quality training data, in a [special example based format](../how-to/fine-tuning.md#example-file-format), to create the new fine-tuned Large Language Model. By focusing on specific topics, fine-tuning allows the model to provide more accurate and relevant responses within those areas of focus. ++### Illustrative use case ++An IT department has been using GPT-4 to convert natural language queries to SQL, but they have found that the responses are not always reliably grounded in their schema, and the cost is prohibitively high. ++They fine-tune GPT-3.5-Turbo with hundreds of requests and correct responses and produce a model that performs better than the base model with lower costs and latency. ++### Things to consider ++- Fine-tuning is an advanced capability; it enhances LLM with after-cutoff-date knowledge and/or domain specific knowledge. Start by evaluating the baseline performance of a standard model against their requirements before considering this option. ++- Having a baseline for performance without fine-tuning is essential for knowing whether fine-tuning has improved model performance. Fine-tuning with bad data makes the base model worse, but without a baseline, it's hard to detect regressions. ++- Good cases for fine-tuning include steering the model to output content in a specific and customized style, tone, or format, or tasks where the information needed to steer the model is too long or complex to fit into the prompt window. ++- Fine-tuning costs: ++ - Fine-tuning can reduce costs across two dimensions: (1) by using fewer tokens depending on the task (2) by using a smaller model (for example GPT 3.5 Turbo can potentially be fine-tuned to achieve the same quality of GPT-4 on a particular task). ++ - Fine-tuning has upfront costs for training the model. And additional hourly costs for hosting the custom model once it's deployed. ++### Getting started ++- [When to use Azure OpenAI fine-tuning](./fine-tuning-considerations.md) +- [Customize a model with fine-tuning](../how-to/fine-tuning.md) +- [Azure OpenAI GPT 3.5 Turbo fine-tuning tutorial](../tutorials/fine-tune.md) +- [To fine-tune or not to fine-tune? (Video)](https://www.youtube.com/watch?v=0Jo-z-MFxJs) |
ai-services | Models | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/concepts/models.md | GPT-3.5 Turbo version 0301 is the first version of the model released. Version See [model versions](../concepts/model-versions.md) to learn about how Azure OpenAI Service handles model version upgrades, and [working with models](../how-to/working-with-models.md) to learn how to view and configure the model version settings of your GPT-3.5 Turbo deployments. > [!NOTE]-> Version `0613` of `gpt-35-turbo` and `gpt-35-turbo-16k` will be retired no earlier than June 13, 2024. Version `0301` of `gpt-35-turbo` will be retired no earlier than July 5, 2024. See [model updates](../how-to/working-with-models.md#model-updates) for model upgrade behavior. +> Version `0613` of `gpt-35-turbo` and `gpt-35-turbo-16k` will be retired no earlier than July 13, 2024. Version `0301` of `gpt-35-turbo` will be retired no earlier than June 13, 2024. See [model updates](../how-to/working-with-models.md#model-updates) for model upgrade behavior. | Model ID | Max Request (tokens) | Training Data (up to) | | |::|:-:| See [model versions](../concepts/model-versions.md) to learn about how Azure Ope **<sup>1</sup>** This model will accept requests > 4,096 tokens. It is not recommended to exceed the 4,096 input token limit as the newer version of the model are capped at 4,096 tokens. If you encounter issues when exceeding 4,096 input tokens with this model this configuration is not officially supported. +#### Azure Government regions ++The following GPT-3.5 turbo models are available with [Azure Government](/azure/azure-government/documentation-government-welcome): ++|Model ID | Model Availability | +|--|--| +| `gpt-35-turbo` (1106-Preview) | US Gov Virginia | + ### Embeddings models These models can only be used with Embedding API requests. |
ai-services | Provisioned Throughput | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/concepts/provisioned-throughput.md | az cognitiveservices account deployment create \ --name <myResourceName> \ --resource-group <myResourceGroupName> \ --deployment-name MyDeployment \model-name GPT-4 \+--model-name gpt-4 \ --model-version 0613 \ --model-format OpenAI \ --sku-capacity 100 \ |
ai-services | Use Your Data | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/concepts/use-your-data.md | There's an [upload limit](../quotas-limits.md), and there are some caveats about ## Supported data sources -You need to connect to a data source to upload your data. When you want to use your data to chat with an Azure OpenAI model, your data is chunked in a search index so that relevant data can be found based on user queries. For some data sources such as uploading files from your local machine (preview) or data contained in a blob storage account (preview), Azure AI Search is used. +You need to connect to a data source to upload your data. When you want to use your data to chat with an Azure OpenAI model, your data is chunked in a search index so that relevant data can be found based on user queries. -When you choose the following data sources, your data is ingested into an Azure AI Search index. +The [Integrated Vector Database in vCore-based Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/vector-search) natively supports integration with Azure OpenAI On Your Data. ++For some data sources such as uploading files from your local machine (preview) or data contained in a blob storage account (preview), Azure AI Search is used. When you choose the following data sources, your data is ingested into an Azure AI Search index. ++>[!TIP] +>If you use Azure Cosmos DB (except for its vCore-based API for MongoDB), you may be eligible for the [Azure AI Advantage offer](/azure/cosmos-db/ai-advantage), which provides the equivalent of up to $6,000 in Azure Cosmos DB throughput credits. |Data source | Description | ||| | [Azure AI Search](/azure/search/search-what-is-azure-search) | Use an existing Azure AI Search index with Azure OpenAI On Your Data. |+| [Azure Cosmos DB](/azure/cosmos-db/introduction) | Azure Cosmos DB's API for Postgres and vCore-based API for MongoDB have natively integrated vector indexing and do not require Azure AI Search; however, its other APIs do require Azure AI Search for vector indexing. Azure Cosmos DB for NoSQL will offer a natively integrated vector database by mid-2024. | |Upload files (preview) | Upload files from your local machine to be stored in an Azure Blob Storage database, and ingested into Azure AI Search. | |URL/Web address (preview) | Web content from the URLs is stored in Azure Blob Storage. | |Azure Blob Storage (preview) | Upload files from Azure Blob Storage to be ingested into an Azure AI Search index. | If you want to implement additional value-based criteria for query execution, yo [!INCLUDE [ai-search-ingestion](../includes/ai-search-ingestion.md)] -# [Azure Cosmos DB for MongoDB vCore](#tab/mongo-db) +# [Vector Database in Azure Cosmos DB for MongoDB](#tab/mongo-db) ### Prerequisites-* [Azure Cosmos DB for MongoDB vCore](/azure/cosmos-db/mongodb/vcore/introduction) account +* [vCore-based Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/introduction) account * A deployed [embedding model](../concepts/understand-embeddings.md) ### Limitations-* Only Azure Cosmos DB for MongoDB vCore is supported. -* The search type is limited to [Azure Cosmos DB for MongoDB vCore vector search](/azure/cosmos-db/mongodb/vcore/vector-search) with an Azure OpenAI embedding model. +* Only vCore-based Azure Cosmos DB for MongoDB is supported. +* The search type is limited to [Integrated Vector Database in Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/vector-search) with an Azure OpenAI embedding model. * This implementation works best on unstructured and spatial data. ### Data preparation Use the script provided on [GitHub](https://github.com/microsoft/sample-app-aoai <!--### Add your data source in Azure OpenAI Studio -To add Azure Cosmos DB for MongoDB vCore as a data source, you will need an existing Azure Cosmos DB for MongoDB vCore index containing your data, and a deployed Azure OpenAI Ada embeddings model that will be used for vector search. +To add vCore-based Azure Cosmos DB for MongoDB as a data source, you will need an existing Azure Cosmos DB for MongoDB index containing your data, and a deployed Azure OpenAI Ada embeddings model that will be used for vector search. -1. In the [Azure OpenAI portal](https://oai.azure.com/portal) chat playground, select **Add your data**. In the panel that appears, select **Azure Cosmos DB for MongoDB vCore** as the data source. +1. In the [Azure OpenAI portal](https://oai.azure.com/portal) chat playground, select **Add your data**. In the panel that appears, select ** vCore-based Azure Cosmos DB for MongoDB** as the data source. 1. Select your Azure subscription and database account, then connect to your Azure Cosmos DB account by providing your Azure Cosmos DB account username and password. :::image type="content" source="../media/use-your-data/add-mongo-data-source.png" alt-text="A screenshot showing the screen for adding Mongo DB as a data source in Azure OpenAI Studio." lightbox="../media/use-your-data/add-mongo-data-source.png"::: To add Azure Cosmos DB for MongoDB vCore as a data source, you will need an exis ### Index field mapping -When you add your Azure Cosmos DB for MongoDB vCore data source, you can specify data fields to properly map your data for retrieval. +When you add your vCore-based Azure Cosmos DB for MongoDB data source, you can specify data fields to properly map your data for retrieval. * Content data (required): One or more provided fields that will be used to ground the model on your data. For multiple fields, separate the values with commas, with no spaces. * File name/title/URL: Used to display more information when a document is referenced in the chat. You can modify the following additional settings in the **Data parameters** sect |**Retrieved documents** | This parameter is an integer that can be set to 3, 5, 10, or 20, and controls the number of document chunks provided to the large language model for formulating the final response. By default, this is set to 5. The search process can be noisy and sometimes, due to chunking, relevant information might be spread across multiple chunks in the search index. Selecting a top-K number, like 5, ensures that the model can extract relevant information, despite the inherent limitations of search and chunking. However, increasing the number too high can potentially distract the model. Additionally, the maximum number of documents that can be effectively used depends on the version of the model, as each has a different context size and capacity for handling documents. If you find that responses are missing important context, try increasing this parameter. This is the `topNDocuments` parameter in the API, and is 5 by default. | | **Strictness** | Determines the system's aggressiveness in filtering search documents based on their similarity scores. The system queries Azure Search or other document stores, then decides which documents to provide to large language models like ChatGPT. Filtering out irrelevant documents can significantly enhance the performance of the end-to-end chatbot. Some documents are excluded from the top-K results if they have low similarity scores before forwarding them to the model. This is controlled by an integer value ranging from 1 to 5. Setting this value to 1 means that the system will minimally filter documents based on search similarity to the user query. Conversely, a setting of 5 indicates that the system will aggressively filter out documents, applying a very high similarity threshold. If you find that the chatbot omits relevant information, lower the filter's strictness (set the value closer to 1) to include more documents. Conversely, if irrelevant documents distract the responses, increase the threshold (set the value closer to 5). This is the `strictness` parameter in the API, and set to 3 by default. | +### Uncited references ++It's possible for the model to return `"TYPE":"UNCITED_REFERENCE"` instead of `"TYPE":CONTENT` in the API for documents that are retrieved from the data source, but not included in the citation. This can be useful for debugging, and you can control this behavior by modifying the **strictness** and **retrieved documents** runtime parameters described above. + ### System message You can define a system message to steer the model's reply when using Azure OpenAI On Your Data. This message allows you to customize your replies on top of the retrieval augmented generation (RAG) pattern that Azure OpenAI On Your Data uses. The system message is used in addition to an internal base prompt to provide the experience. To support this, we truncate the system message after a specific [number of tokens](#token-usage-estimation-for-azure-openai-on-your-data) to ensure the model can answer questions using your data. If you are defining extra behavior on top of the default experience, ensure that your system prompt is detailed and explains the exact expected customization. token_output = TokenEstimator.estimate_tokens(input_text) ## Troubleshooting -### Failed ingestion jobs --To troubleshoot a failed job, always look out for errors or warnings specified either in the API response or Azure OpenAI studio. Here are some of the common errors and warnings: +To troubleshoot failed operations, always look out for errors or warnings specified either in the API response or Azure OpenAI studio. Here are some of the common errors and warnings: +### Failed ingestion jobs **Quota Limitations Issues** Resolution: This means the storage account isn't accessible with the given credentials. In this case, please review the storage account credentials passed to the API and ensure the storage account isn't hidden behind a private endpoint (if a private endpoint isn't configured for this resource). +### 503 errors when sending queries with Azure AI Search ++Each user message can translate to multiple search queries, all of which get sent to the search resource in parallel. This can produce throttling behavior when the amount of search replicas and partitions is low. The maximum number of queries per second that a single partition and single replica can support may not be sufficient. In this case, consider increasing your replicas and partitions, or adding sleep/retry logic in your application. See the [Azure AI Search documentation](../../../search/performance-benchmarks.md) for more information. + ## Regional availability and model support You can use Azure OpenAI On Your Data with an Azure OpenAI resource in the following regions: |
ai-services | Azure Developer Cli | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/how-to/azure-developer-cli.md | + + Title: 'Use the Azure Developer CLI to deploy resources for Azure OpenAI On Your Data' ++description: Use this article to learn how to automate resource deployment for Azure OpenAI On Your Data. +++++ Last updated : 04/09/2024+recommendations: false +++# Use the Azure Developer CLI to deploy resources for Azure OpenAI On Your Data ++Use this article to learn how to automate resource deployment for Azure OpenAI On Your Data. The Azure Developer CLI (`azd`) is an open-source, command-line tool that streamlines provisioning and deploying resources to Azure using a template system. The template contains infrastructure files to provision the necessary Azure OpenAI resources and configurations and includes the completed sample app code. ++## Prerequisites ++- An Azure subscription - <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">Create one for free</a>. +- Access granted to Azure OpenAI in the desired Azure subscription. ++ Azure OpenAI requires registration and is currently only available to approved enterprise customers and partners. [See Limited access to Azure OpenAI Service](/legal/cognitive-services/openai/limited-access?context=/azure/ai-services/openai/context/context) for more information. You can apply for access to Azure OpenAI by completing the form at <a href="https://aka.ms/oai/access" target="_blank">https://aka.ms/oai/access</a>. Open an issue on this repo to contact us if you have an issue. ++- The Azure Developer CLI [installed](/azure/developer/azure-developer-cli/install-azd) on your machine ++## Clone and initialize the Azure Developer CLI template ++++1. For the steps ahead, clone and initialize the template. ++ ```bash + azd init --template openai-chat-your-own-data + ``` + +2. The `azd init` command prompts you for the following information: ++ * Environment name: This value is used as a prefix for all Azure resources created by Azure Developer CLI. The name must be unique across all Azure subscriptions and must be between 3 and 24 characters long. The name can contain numbers and lowercase letters only. ++## Use the template to deploy resources ++1. Sign-in to Azure: ++ ```bash + azd auth login + ``` ++1. Provision and deploy the OpenAI resource to Azure: ++ ```bash + azd up + ``` + + `azd` prompts you for the following information: + + * Subscription: The Azure subscription that your resources are deployed to. + * Location: The Azure region where your resources are deployed. + + > [!NOTE] + > The sample `azd` template uses the `gpt-35-turbo-16k` model. A recommended region for this template is East US, since different Azure regions support different OpenAI models. You can visit the [Azure OpenAI Service Models](/azure/ai-services/openai/concepts/models) support page for more details about model support by region. + + > [!NOTE] + > The provisioning process may take several minutes to complete. Wait for the task to finish before you proceed to the next steps. + +1. Click the link `azd` outputs to navigate to the new resource group in the Azure portal. You should see the following top level resources: + + * An Azure OpenAI service with a deployed model + * An Azure Storage account you can use to upload your own data files + * An Azure AI Search service configured with the proper indexes and data sources ++## Upload data to the storage account ++`azd` provisioned all of the required resources for you to chat with your own data, but you still need to upload the data files you want to make available to your AI service. ++1. Navigate to the new storage account in the Azure portal. +1. On the left navigation, select **Storage browser**. +1. Select **Blob containers** and then navigate into the **File uploads** container. +1. Click the **Upload** button at the top of the screen. +1. In the flyout menu that opens, upload _contoso_benefits_document_example.pdf_ file in the root `documents` folder of the example repo. + +> [!NOTE] +> The search indexer is set to run every 5 minutes to index the data in the storage account. You can either wait a few minutes for the uploaded data to be indexed, or you can manually run the indexer from the search service page. ++## Connect or create an application ++After running the `azd` template and uploading your data, you're ready to start using Azure OpenAI on Your Data. See the [quickstart article](../use-your-data-quickstart.md) for code samples you can use to build your applications. |
ai-services | Chat Markup Language | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/how-to/chat-markup-language.md | + + Title: How to work with the Chat Markup Language (preview) ++description: Learn how to work with Chat Markup Language (preview) ++++ Last updated : 04/05/2024++keywords: ChatGPT +++# Chat Markup Language ChatML (Preview) ++> [!IMPORTANT] +> Using GPT-3.5-Turbo models with the completion endpoint as described in this article remains in preview and is only possible with `gpt-35-turbo` version (0301) which is [slated for retirement as early as June 13th, 2024](../concepts/model-retirements.md#current-models). We strongly recommend using the [GA Chat Completion API/endpoint](./chatgpt.md). The Chat Completion API is the recommended method of interacting with the GPT-3.5-Turbo models. The Chat Completion API is also the only way to access the GPT-4 models. ++The following code snippet shows the most basic way to use the GPT-3.5-Turbo models with ChatML. If this is your first time using these models programmatically we recommend starting with our [GPT-35-Turbo & GPT-4 Quickstart](../chatgpt-quickstart.md). ++> [!NOTE] +> In the Azure OpenAI documentation we refer to GPT-3.5-Turbo, and GPT-35-Turbo interchangeably. The official name of the model on OpenAI is `gpt-3.5-turbo`, but for Azure OpenAI due to Azure specific character constraints the underlying model name is `gpt-35-turbo`. ++```python +import os +import openai +openai.api_type = "azure" +openai.api_base = "https://{your-resource-name}.openai.azure.com/" +openai.api_version = "2024-02-01" +openai.api_key = os.getenv("OPENAI_API_KEY") ++response = openai.Completion.create( + engine="gpt-35-turbo", # The deployment name you chose when you deployed the GPT-35-Turbo model + prompt="<|im_start|>system\nAssistant is a large language model trained by OpenAI.\n<|im_end|>\n<|im_start|>user\nWho were the founders of Microsoft?\n<|im_end|>\n<|im_start|>assistant\n", + temperature=0, + max_tokens=500, + top_p=0.5, + stop=["<|im_end|>"]) ++print(response['choices'][0]['text']) +``` ++> [!NOTE] +> The following parameters aren't available with the gpt-35-turbo model: `logprobs`, `best_of`, and `echo`. If you set any of these parameters, you'll get an error. ++The `<|im_end|>` token indicates the end of a message. When using ChatML it is recommended to include `<|im_end|>` token as a stop sequence to ensure that the model stops generating text when it reaches the end of the message. ++Consider setting `max_tokens` to a slightly higher value than normal such as 300 or 500. This ensures that the model doesn't stop generating text before it reaches the end of the message. ++## Model versioning ++> [!NOTE] +> `gpt-35-turbo` is equivalent to the `gpt-3.5-turbo` model from OpenAI. ++Unlike previous GPT-3 and GPT-3.5 models, the `gpt-35-turbo` model as well as the `gpt-4` and `gpt-4-32k` models will continue to be updated. When creating a [deployment](../how-to/create-resource.md#deploy-a-model) of these models, you'll also need to specify a model version. ++You can find the model retirement dates for these models on our [models](../concepts/models.md) page. ++## Working with Chat Markup Language (ChatML) ++> [!NOTE] +> OpenAI continues to improve the GPT-35-Turbo and the Chat Markup Language used with the models will continue to evolve in the future. We'll keep this document updated with the latest information. ++OpenAI trained GPT-35-Turbo on special tokens that delineate the different parts of the prompt. The prompt starts with a system message that is used to prime the model followed by a series of messages between the user and the assistant. ++The format of a basic ChatML prompt is as follows: ++``` +<|im_start|>system +Provide some context and/or instructions to the model. +<|im_end|> +<|im_start|>user +The userΓÇÖs message goes here +<|im_end|> +<|im_start|>assistant +``` ++### System message ++The system message is included at the beginning of the prompt between the `<|im_start|>system` and `<|im_end|>` tokens. This message provides the initial instructions to the model. You can provide various information in the system message including: ++* A brief description of the assistant +* Personality traits of the assistant +* Instructions or rules you would like the assistant to follow +* Data or information needed for the model, such as relevant questions from an FAQ ++You can customize the system message for your use case or just include a basic system message. The system message is optional, but it's recommended to at least include a basic one to get the best results. ++### Messages ++After the system message, you can include a series of messages between the **user** and the **assistant**. Each message should begin with the `<|im_start|>` token followed by the role (`user` or `assistant`) and end with the `<|im_end|>` token. ++``` +<|im_start|>user +What is thermodynamics? +<|im_end|> +``` ++To trigger a response from the model, the prompt should end with `<|im_start|>assistant` token indicating that it's the assistant's turn to respond. You can also include messages between the user and the assistant in the prompt as a way to do few shot learning. ++### Prompt examples ++The following section shows examples of different styles of prompts that you could use with the GPT-35-Turbo and GPT-4 models. These examples are just a starting point, and you can experiment with different prompts to customize the behavior for your own use cases. ++#### Basic example ++If you want the GPT-35-Turbo and GPT-4 models to behave similarly to [chat.openai.com](https://chat.openai.com/), you can use a basic system message like "Assistant is a large language model trained by OpenAI." ++``` +<|im_start|>system +Assistant is a large language model trained by OpenAI. +<|im_end|> +<|im_start|>user +Who were the founders of Microsoft? +<|im_end|> +<|im_start|>assistant +``` ++#### Example with instructions ++For some scenarios, you might want to give additional instructions to the model to define guardrails for what the model is able to do. ++``` +<|im_start|>system +Assistant is an intelligent chatbot designed to help users answer their tax related questions. ++Instructions: +- Only answer questions related to taxes. +- If you're unsure of an answer, you can say "I don't know" or "I'm not sure" and recommend users go to the IRS website for more information. +<|im_end|> +<|im_start|>user +When are my taxes due? +<|im_end|> +<|im_start|>assistant +``` ++#### Using data for grounding ++You can also include relevant data or information in the system message to give the model extra context for the conversation. If you only need to include a small amount of information, you can hard code it in the system message. If you have a large amount of data that the model should be aware of, you can use [embeddings](../tutorials/embeddings.md?tabs=command-line) or a product like [Azure AI Search](https://techcommunity.microsoft.com/t5/ai-applied-ai-blog/revolutionize-your-enterprise-data-with-chatgpt-next-gen-apps-w/ba-p/3762087) to retrieve the most relevant information at query time. ++``` +<|im_start|>system +Assistant is an intelligent chatbot designed to help users answer technical questions about Azure OpenAI Serivce. Only answer questions using the context below and if you're not sure of an answer, you can say "I don't know". ++Context: +- Azure OpenAI Service provides REST API access to OpenAI's powerful language models including the GPT-3, Codex and Embeddings model series. +- Azure OpenAI Service gives customers advanced language AI with OpenAI GPT-3, Codex, and DALL-E models with the security and enterprise promise of Azure. Azure OpenAI co-develops the APIs with OpenAI, ensuring compatibility and a smooth transition from one to the other. +- At Microsoft, we're committed to the advancement of AI driven by principles that put people first. Microsoft has made significant investments to help guard against abuse and unintended harm, which includes requiring applicants to show well-defined use cases, incorporating MicrosoftΓÇÖs principles for responsible AI use +<|im_end|> +<|im_start|>user +What is Azure OpenAI Service? +<|im_end|> +<|im_start|>assistant +``` ++#### Few shot learning with ChatML ++You can also give few shot examples to the model. The approach for few shot learning has changed slightly because of the new prompt format. You can now include a series of messages between the user and the assistant in the prompt as few shot examples. These examples can be used to seed answers to common questions to prime the model or teach particular behaviors to the model. ++This is only one example of how you can use few shot learning with GPT-35-Turbo. You can experiment with different approaches to see what works best for your use case. ++``` +<|im_start|>system +Assistant is an intelligent chatbot designed to help users answer their tax related questions. +<|im_end|> +<|im_start|>user +When do I need to file my taxes by? +<|im_end|> +<|im_start|>assistant +In 2023, you will need to file your taxes by April 18th. The date falls after the usual April 15th deadline because April 15th falls on a Saturday in 2023. For more details, see https://www.irs.gov/filing/individuals/when-to-file +<|im_end|> +<|im_start|>user +How can I check the status of my tax refund? +<|im_end|> +<|im_start|>assistant +You can check the status of your tax refund by visiting https://www.irs.gov/refunds +<|im_end|> +``` ++#### Using Chat Markup Language for non-chat scenarios ++ChatML is designed to make multi-turn conversations easier to manage, but it also works well for non-chat scenarios. ++For example, for an entity extraction scenario, you might use the following prompt: ++``` +<|im_start|>system +You are an assistant designed to extract entities from text. Users will paste in a string of text and you will respond with entities you've extracted from the text as a JSON object. Here's an example of your output format: +{ + "name": "", + "company": "", + "phone_number": "" +} +<|im_end|> +<|im_start|>user +Hello. My name is Robert Smith. IΓÇÖm calling from Contoso Insurance, Delaware. My colleague mentioned that you are interested in learning about our comprehensive benefits policy. Could you give me a call back at (555) 346-9322 when you get a chance so we can go over the benefits? +<|im_end|> +<|im_start|>assistant +``` +++## Preventing unsafe user inputs ++It's important to add mitigations into your application to ensure safe use of the Chat Markup Language. ++We recommend that you prevent end-users from being able to include special tokens in their input such as `<|im_start|>` and `<|im_end|>`. We also recommend that you include additional validation to ensure the prompts you're sending to the model are well formed and follow the Chat Markup Language format as described in this document. ++You can also provide instructions in the system message to guide the model on how to respond to certain types of user inputs. For example, you can instruct the model to only reply to messages about a certain subject. You can also reinforce this behavior with few shot examples. +++## Managing conversations ++The token limit for `gpt-35-turbo` is 4096 tokens. This limit includes the token count from both the prompt and completion. The number of tokens in the prompt combined with the value of the `max_tokens` parameter must stay under 4096 or you'll receive an error. ++ItΓÇÖs your responsibility to ensure the prompt and completion falls within the token limit. This means that for longer conversations, you need to keep track of the token count and only send the model a prompt that falls within the token limit. ++The following code sample shows a simple example of how you could keep track of the separate messages in the conversation. ++```python +import os +import openai +openai.api_type = "azure" +openai.api_base = "https://{your-resource-name}.openai.azure.com/" #This corresponds to your Azure OpenAI resource's endpoint value +openai.api_version = "2024-02-01" +openai.api_key = os.getenv("OPENAI_API_KEY") ++# defining a function to create the prompt from the system message and the conversation messages +def create_prompt(system_message, messages): + prompt = system_message + for message in messages: + prompt += f"\n<|im_start|>{message['sender']}\n{message['text']}\n<|im_end|>" + prompt += "\n<|im_start|>assistant\n" + return prompt ++# defining the user input and the system message +user_input = "<your user input>" +system_message = f"<|im_start|>system\n{'<your system message>'}\n<|im_end|>" ++# creating a list of messages to track the conversation +messages = [{"sender": "user", "text": user_input}] ++response = openai.Completion.create( + engine="gpt-35-turbo", # The deployment name you chose when you deployed the GPT-35-Turbo model. + prompt=create_prompt(system_message, messages), + temperature=0.5, + max_tokens=250, + top_p=0.9, + frequency_penalty=0, + presence_penalty=0, + stop=['<|im_end|>'] +) ++messages.append({"sender": "assistant", "text": response['choices'][0]['text']}) +print(response['choices'][0]['text']) +``` ++## Staying under the token limit ++The simplest approach to staying under the token limit is to remove the oldest messages in the conversation when you reach the token limit. ++You can choose to always include as many tokens as possible while staying under the limit or you could always include a set number of previous messages assuming those messages stay within the limit. It's important to keep in mind that longer prompts take longer to generate a response and incur a higher cost than shorter prompts. ++You can estimate the number of tokens in a string by using the [tiktoken](https://github.com/openai/tiktoken) Python library as shown below. ++```python +import tiktoken ++cl100k_base = tiktoken.get_encoding("cl100k_base") ++enc = tiktoken.Encoding( + name="gpt-35-turbo", + pat_str=cl100k_base._pat_str, + mergeable_ranks=cl100k_base._mergeable_ranks, + special_tokens={ + **cl100k_base._special_tokens, + "<|im_start|>": 100264, + "<|im_end|>": 100265 + } +) ++tokens = enc.encode( + "<|im_start|>user\nHello<|im_end|><|im_start|>assistant", + allowed_special={"<|im_start|>", "<|im_end|>"} +) ++assert len(tokens) == 7 +assert tokens == [100264, 882, 198, 9906, 100265, 100264, 78191] +``` ++## Next steps ++* [Learn more about Azure OpenAI](../overview.md). +* Get started with the GPT-35-Turbo model with [the GPT-35-Turbo & GPT-4 quickstart](../chatgpt-quickstart.md). +* For more examples, check out the [Azure OpenAI Samples GitHub repository](https://aka.ms/AOAICodeSamples) |
ai-services | Chatgpt | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/how-to/chatgpt.md | Title: How to work with the GPT-35-Turbo and GPT-4 models + Title: Work with the GPT-35-Turbo and GPT-4 models -description: Learn about the options for how to use the GPT-35-Turbo and GPT-4 models +description: Learn about the options for how to use the GPT-35-Turbo and GPT-4 models. Previously updated : 03/29/2024 Last updated : 04/05/2024 keywords: ChatGPT-zone_pivot_groups: openai-chat -# Learn how to work with the GPT-35-Turbo and GPT-4 models +# Work with the GPT-3.5-Turbo and GPT-4 models -The GPT-35-Turbo and GPT-4 models are language models that are optimized for conversational interfaces. The models behave differently than the older GPT-3 models. Previous models were text-in and text-out, meaning they accepted a prompt string and returned a completion to append to the prompt. However, the GPT-35-Turbo and GPT-4 models are conversation-in and message-out. The models expect input formatted in a specific chat-like transcript format, and return a completion that represents a model-written message in the chat. While this format was designed specifically for multi-turn conversations, you'll find it can also work well for non-chat scenarios too. +The GPT-3.5-Turbo and GPT-4 models are language models that are optimized for conversational interfaces. The models behave differently than the older GPT-3 models. Previous models were text-in and text-out, which means they accepted a prompt string and returned a completion to append to the prompt. However, the GPT-3.5-Turbo and GPT-4 models are conversation-in and message-out. The models expect input formatted in a specific chat-like transcript format. They return a completion that represents a model-written message in the chat. This format was designed specifically for multi-turn conversations, but it can also work well for nonchat scenarios. -In Azure OpenAI there are two different options for interacting with these type of models: +This article walks you through getting started with the GPT-3.5-Turbo and GPT-4 models. To get the best results, use the techniques described here. Don't try to interact with the models the same way you did with the older model series because the models are often verbose and provide less useful responses. -- Chat Completion API.-- Completion API with Chat Markup Language (ChatML).--The Chat Completion API is a new dedicated API for interacting with the GPT-35-Turbo and GPT-4 models. This API is the preferred method for accessing these models. **It is also the only way to access the new GPT-4 models**. --ChatML uses the same [completion API](../reference.md#completions) that you use for other models like text-davinci-002, it requires a unique token based prompt format known as Chat Markup Language (ChatML). This provides lower level access than the dedicated Chat Completion API, but also requires additional input validation, only supports gpt-35-turbo models, and **the underlying format is more likely to change over time**. --This article walks you through getting started with the GPT-35-Turbo and GPT-4 models. It's important to use the techniques described here to get the best results. If you try to interact with the models the same way you did with the older model series, the models will often be verbose and provide less useful responses. ------ |
ai-services | Monitoring | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/how-to/monitoring.md | The following table summarizes the current subset of metrics available in Azure |Metric|Category|Aggregation|Description|Dimensions| |||||| |`Azure OpenAI Requests`|HTTP|Count|Total number of calls made to the Azure OpenAI API over a period of time. Applies to PayGo, PTU, and PTU-managed SKUs.| `ApiName`, `ModelDeploymentName`,`ModelName`,`ModelVersion`, `OperationName`, `Region`, `StatusCode`, `StreamType`|-| `Generated Completion Tokens` | Usage | Sum | Number of generated tokens (output) from an OpenAI model. Applies to PayGo, PTU, and PTU-manged SKUs | `ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| -| `Processed FineTuned Training Hours` | Usage |Sum| Number of Training Hours Processed on an OpenAI FineTuned Model | `ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| -| `Processed Inference Tokens` | Usage | Sum| Number of inference tokens processed by an OpenAI model. Calculated as prompt tokens (input) + generated tokens. Applies to PayGo, PTU, and PTU-manged SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| -| `Processed Prompt Tokens` | Usage | Sum | Total number of prompt tokens (input) processed on an OpenAI model. Applies to PayGo, PTU, and PTU-managed SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| +| `Generated Completion Tokens` | Usage | Sum | Number of generated tokens (output) from an Azure OpenAI model. Applies to PayGo, PTU, and PTU-manged SKUs | `ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| +| `Processed FineTuned Training Hours` | Usage |Sum| Number of training hours processed on an Azure OpenAI fine-tuned model. | `ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| +| `Processed Inference Tokens` | Usage | Sum| Number of inference tokens processed by an Azure OpenAI model. Calculated as prompt tokens (input) + generated tokens. Applies to PayGo, PTU, and PTU-manged SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| +| `Processed Prompt Tokens` | Usage | Sum | Total number of prompt tokens (input) processed on an Azure OpenAI model. Applies to PayGo, PTU, and PTU-managed SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`| | `Provision-managed Utilization V2` | Usage | Average | Provision-managed utilization is the utilization percentage for a given provisioned-managed deployment. Calculated as (PTUs consumed/PTUs deployed)*100. When utilization is at or above 100%, calls are throttled and return a 429 error code. | `ModelDeploymentName`,`ModelName`,`ModelVersion`, `Region`, `StreamType`| ## Configure diagnostic settings |
ai-services | Reproducible Output | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/how-to/reproducible-output.md | Title: 'How to generate reproducible output with Azure OpenAI Service' -description: Learn how to generate reproducible output (preview) with Azure OpenAI Service +description: Learn how to generate reproducible output (preview) with Azure OpenAI Service. Previously updated : 11/17/2023 Last updated : 04/09/2024 recommendations: false recommendations: false # Learn how to use reproducible output (preview) -By default if you ask an Azure OpenAI Chat Completion model the same question multiple times you are likely to get a different response. The responses are therefore considered to be non-deterministic. Reproducible output is a new preview feature that allows you to selectively change the default behavior towards producing more deterministic outputs. +By default if you ask an Azure OpenAI Chat Completion model the same question multiple times you're likely to get a different response. The responses are therefore considered to be non-deterministic. Reproducible output is a new preview feature that allows you to selectively change the default behavior to help product more deterministic outputs. ## Reproducible output support Reproducible output is only currently supported with the following: ### Supported models -- `gpt-4-1106-preview` ([region availability](../concepts/models.md#gpt-4-and-gpt-4-turbo-preview-model-availability))-- `gpt-35-turbo-1106` ([region availability)](../concepts/models.md#gpt-35-turbo-model-availability))+* `gpt-35-turbo` (1106) - [region availability](../concepts/models.md#gpt-35-turbo-model-availability) +* `gpt-35-turbo` (0125) - [region availability](../concepts/models.md#gpt-35-turbo-model-availability) +* `gpt-4` (1106-Preview) - [region availability](../concepts/models.md#gpt-4-and-gpt-4-turbo-preview-model-availability) +* `gpt-4` (0125-Preview) - [region availability](../concepts/models.md#gpt-4-and-gpt-4-turbo-preview-model-availability) ### API Version -- `2023-12-01-preview`+Support for reproducible output was first added in API version [`2023-12-01-preview`](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-12-01-preview/inference.json) ## Example from openai import AzureOpenAI client = AzureOpenAI( azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"), api_key=os.getenv("AZURE_OPENAI_API_KEY"), - api_version="2023-12-01-preview" + api_version="2024-02-01" ) for i in range(3): print(f'Story Version {i + 1}\n') response = client.chat.completions.create(- model="gpt-4-1106-preview", # Model = should match the deployment name you chose for your 1106-preview model deployment + model="gpt-35-turbo-0125", # Model = should match the deployment name you chose for your 0125-preview model deployment #seed=42, temperature=0.7,- max_tokens =200, + max_tokens =50, messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Tell me a story about how the universe began?"} for i in range(3): $openai = @{ api_key = $Env:AZURE_OPENAI_API_KEY api_base = $Env:AZURE_OPENAI_ENDPOINT # like the following https://YOUR_RESOURCE_NAME.openai.azure.com/- api_version = '2023-12-01-preview' # may change in the future + api_version = '2024-02-01' # may change in the future name = 'YOUR-DEPLOYMENT-NAME-HERE' # name you chose for your deployment } $messages += @{ $body = @{ #seed = 42 temperature = 0.7- max_tokens = 200 + max_tokens = 50 messages = $messages } | ConvertTo-Json for ($i=0; $i -le 2; $i++) { ```output Story Version 1 -In the beginning, there was nothingness, a vast expanse of empty space, a blank canvas waiting to be painted with the wonders of existence. Then, approximately 13.8 billion years ago, something extraordinary happened, an event that would mark the birth of the universe ΓÇô the Big Bang. --The Big Bang was not an explosion in the conventional sense but rather an expansion, an incredibly rapid stretching of space that took place everywhere in the universe at once. In just a fraction of a second, the universe grew from smaller than a single atom to an incomprehensibly large expanse. --In these first moments, the universe was unimaginably hot and dense, filled with a seething soup of subatomic particles and radiant energy. As the universe expanded, it began to cool, allowing the first particles to form. Protons and neutrons came together to create the first simple atomic nuclei in a process known as nucleosynthesis. --For hundreds of thousands of years, the universe continued to cool and expand +Once upon a time, before there was time, there was nothing but a vast emptiness. In this emptiness, there existed a tiny, infinitely dense point of energy. This point contained all the potential for the universe as we know it. And Story Version 2 -Once upon a time, in the vast expanse of nothingness, there was a moment that would come to define everything. This moment, a tiny fraction of a second that would be forever known as the Big Bang, marked the birth of the universe as we know it. --Before this moment, there was no space, no time, just an infinitesimally small point of pure energy, a singularity where all the laws of physics as we understand them did not apply. Then, suddenly, this singular point began to expand at an incredible rate. In a cosmic symphony of creation, matter, energy, space, and time all burst forth into existence. --The universe was a hot, dense soup of particles, a place of unimaginable heat and pressure. It was in this crucible of creation that the simplest elements were formed. Hydrogen and helium, the building blocks of the cosmos, came into being. --As the universe continued to expand and cool, these primordial elements began to co +Once upon a time, long before the existence of time itself, there was nothing but darkness and silence. The universe lay dormant, a vast expanse of emptiness waiting to be awakened. And then, in a moment that defies comprehension, there Story Version 3 -Once upon a time, in the vast expanse of nothingness, there was a singularity, an infinitely small and infinitely dense point where all the mass and energy of what would become the universe were concentrated. This singularity was like a tightly wound cosmic spring holding within it the potential of everything that would ever exist. --Then, approximately 13.8 billion years ago, something extraordinary happened. This singularity began to expand in an event we now call the Big Bang. In just a fraction of a second, the universe grew exponentially during a period known as cosmic inflation. It was like a symphony's first resounding chord, setting the stage for a cosmic performance that would unfold over billions of years. --As the universe expanded and cooled, the fundamental forces of nature that we know today ΓÇô gravity, electromagnetism, and the strong and weak nuclear forces ΓÇô began to take shape. Particles of matter were created and began to clump together under the force of gravity, forming the first atoms -+Once upon a time, before time even existed, there was nothing but darkness and stillness. In this vast emptiness, there was a tiny speck of unimaginable energy and potential. This speck held within it all the elements that would come ``` Notice that while each story might have similar elements and some verbatim repetition the longer the response goes on the more they tend to diverge. from openai import AzureOpenAI client = AzureOpenAI( azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"), api_key=os.getenv("AZURE_OPENAI_API_KEY"), - api_version="2023-12-01-preview" + api_version="2024-02-01" ) for i in range(3): print(f'Story Version {i + 1}\n') response = client.chat.completions.create(- model="gpt-4-1106-preview", # Model = should match the deployment name you chose for your 1106-preview model deployment + model="gpt-35-turbo-0125", # Model = should match the deployment name you chose for your 0125-preview model deployment seed=42, temperature=0.7,- max_tokens =200, + max_tokens =50, messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Tell me a story about how the universe began?"} for i in range(3): $openai = @{ api_key = $Env:AZURE_OPENAI_API_KEY api_base = $Env:AZURE_OPENAI_ENDPOINT # like the following https://YOUR_RESOURCE_NAME.openai.azure.com/- api_version = '2023-12-01-preview' # may change in the future + api_version = '2024-02-01' # may change in the future name = 'YOUR-DEPLOYMENT-NAME-HERE' # name you chose for your deployment } $messages += @{ $body = @{ seed = 42 temperature = 0.7- max_tokens = 200 + max_tokens = 50 messages = $messages } | ConvertTo-Json for ($i=0; $i -le 2; $i++) { ``` Story Version 1 -In the beginning, there was nothing but a vast emptiness, a void without form or substance. Then, from this nothingness, a singular event occurred that would change the course of existence foreverΓÇöThe Big Bang. --Around 13.8 billion years ago, an infinitely hot and dense point, no larger than a single atom, began to expand at an inconceivable speed. This was the birth of our universe, a moment where time and space came into being. As this primordial fireball grew, it cooled, and the fundamental forces that govern the cosmosΓÇögravity, electromagnetism, and the strong and weak nuclear forcesΓÇöbegan to take shape. --Matter coalesced into the simplest elements, hydrogen and helium, which later formed vast clouds in the expanding universe. These clouds, driven by the force of gravity, began to collapse in on themselves, creating the first stars. The stars were crucibles of nuclear fusion, forging heavier elements like carbon, nitrogen, and oxygen +In the beginning, there was nothing but darkness and silence. Then, suddenly, a tiny point of light appeared. This point of light contained all the energy and matter that would eventually form the entire universe. With a massive explosion known as the Big Bang Story Version 2 -In the beginning, there was nothing but a vast emptiness, a void without form or substance. Then, from this nothingness, a singular event occurred that would change the course of existence foreverΓÇöThe Big Bang. --Around 13.8 billion years ago, an infinitely hot and dense point, no larger than a single atom, began to expand at an inconceivable speed. This was the birth of our universe, a moment where time and space came into being. As this primordial fireball grew, it cooled, and the fundamental forces that govern the cosmosΓÇögravity, electromagnetism, and the strong and weak nuclear forcesΓÇöbegan to take shape. --Matter coalesced into the simplest elements, hydrogen and helium, which later formed vast clouds in the expanding universe. These clouds, driven by the force of gravity, began to collapse in on themselves, creating the first stars. The stars were crucibles of nuclear fusion, forging heavier elements like carbon, nitrogen, and oxygen +In the beginning, there was nothing but darkness and silence. Then, suddenly, a tiny point of light appeared. This point of light contained all the energy and matter that would eventually form the entire universe. With a massive explosion known as the Big Bang Story Version 3 -In the beginning, there was nothing but a vast emptiness, a void without form or substance. Then, from this nothingness, a singular event occurred that would change the course of existence foreverΓÇöThe Big Bang. --Around 13.8 billion years ago, an infinitely hot and dense point, no larger than a single atom, began to expand at an inconceivable speed. This was the birth of our universe, a moment where time and space came into being. As this primordial fireball grew, it cooled, and the fundamental forces that govern the cosmosΓÇögravity, electromagnetism, and the strong and weak nuclear forcesΓÇöbegan to take shape. +In the beginning, there was nothing but darkness and silence. Then, suddenly, a tiny point of light appeared. This was the moment when the universe was born. -Matter coalesced into the simplest elements, hydrogen and helium, which later formed vast clouds in the expanding universe. These clouds, driven by the force of gravity, began to collapse in on themselves, creating the first stars. The stars were crucibles of nuclear fusion, forging heavier elements like carbon, nitrogen, and oxygen +The point of light began to expand rapidly, creating space and time as it grew. ``` -By using the same `seed` parameter of 42 for each of our three requests we're able to produce much more consistent (in this case identical) results. +By using the same `seed` parameter of 42 for each of our three requests, while keeping all other parameters the same, we're able to produce much more consistent results. ++> [!IMPORTANT] +> Determinism is not guaranteed with reproducible output. Even in cases where the seed parameter and `system_fingerprint` are the same across API calls it is currently not uncommon to still observe a degree of variability in responses. Identical API calls with larger `max_tokens` values, will generally result in less deterministic responses even when the seed parameter is set. ## Parameter details |
ai-services | Use Web App | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/how-to/use-web-app.md | Sample source code for the web app is available on [GitHub](https://github.com/m We recommend pulling changes from the `main` branch for the web app's source code frequently to ensure you have the latest bug fixes, API version, and improvements. Additionally, the web app must be synchronized every time the API version being used is [retired](../api-version-deprecation.md#retiring-soon). +Consider either clicking the **watch** or **star** buttons on the web app's [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT) repo to be notified about changes and updates to the source code. + **If you haven't customized the app:** * You can follow the synchronization steps below |
ai-services | Use Your Data Securely | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/how-to/use-your-data-securely.md | When using the API, pass the `filter` parameter in each API request. For example * `group_id1, group_id2` are groups attributed to the logged in user. The client application can retrieve and cache users' groups. -## Resources configuration +## Resource configuration Use the following sections to configure your resources for optimal secure usage. Even if you plan to only secure part of your resources, you still need to follow all the steps below. This article describes network settings related to disabling public network for Azure OpenAI resources, Azure AI search resources, and storage accounts. Using selected networks with IP rules is not supported, because the services' IP addresses are dynamic. +> [!TIP] +> You can use the bash script available on [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT/blob/main/scripts/validate-oyd-vnet.sh) to validate your setup, and determine if all of the requirements listed here are being met. + ## Create resource group Create a resource group, so you can organize all the relevant resources. The resources in the resource group include but are not limited to: Make sure your sign-in credential has `Cognitive Services OpenAI Contributor` ro ### Ingestion API -See the [ingestion API reference article](/azure/ai-services/openai/reference#start-an-ingestion-job) for details on the request and response objects used by the ingestion API. +See the [ingestion API reference article](/rest/api/azureopenai/ingestion-jobs?context=/azure/ai-services/openai/context/context) for details on the request and response objects used by the ingestion API. More notes: |
ai-services | Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/overview.md | The service provides users access to several different models. Each model provid The DALL-E models (some in preview; see [models](./concepts/models.md#dall-e)) generate images from text prompts that the user provides. -The Whisper models, currently in preview, can be used to transcribe and translate speech to text. +The Whisper models can be used to transcribe and translate speech to text. The text to speech models, currently in preview, can be used to synthesize text to speech. |
ai-services | Reference | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/reference.md | The operation returns a `204` status code if successful. This API only succeeds ## Speech to text +You can use a Whisper model in Azure OpenAI Service for speech to text transcription or speech translation. For more information about using a Whisper model, see the [quickstart](./whisper-quickstart.md) and [the Whisper model overview](../speech-service/whisper-overview.md). + ### Request a speech to text transcription Transcribes an audio file. POST https://{your-resource-name}.openai.azure.com/openai/deployments/{deploymen | Parameter | Type | Required? | Default | Description | |--|--|--|--|--|-| ```file```| file | Yes | N/A | The audio file object (not file name) to transcribe, in one of these formats: `flac`, `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `ogg`, `wav`, or `webm`.<br/><br/>The file size limit for the Azure OpenAI Whisper model is 25 MB. If you need to transcribe a file larger than 25 MB, break it into chunks. Alternatively you can use the Azure AI Speech [batch transcription](../speech-service/batch-transcription-create.md#use-a-whisper-model) API.<br/><br/>You can get sample audio files from the [Azure AI Speech SDK repository at GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/sampledata/audiofiles). | +| ```file```| file | Yes | N/A | The audio file object (not file name) to transcribe, in one of these formats: `flac`, `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `ogg`, `wav`, or `webm`.<br/><br/>The file size limit for the Whisper model in Azure OpenAI Service is 25 MB. If you need to transcribe a file larger than 25 MB, break it into chunks. Alternatively you can use the Azure AI Speech [batch transcription](../speech-service/batch-transcription-create.md#use-a-whisper-model) API.<br/><br/>You can get sample audio files from the [Azure AI Speech SDK repository at GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/sampledata/audiofiles). | | ```language``` | string | No | Null | The language of the input audio such as `fr`. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format improves accuracy and latency.<br/><br/>For the list of supported languages, see the [OpenAI documentation](https://platform.openai.com/docs/guides/speech-to-text/supported-languages). | | ```prompt``` | string | No | Null | An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.<br/><br/>For more information about prompts including example use cases, see the [OpenAI documentation](https://platform.openai.com/docs/guides/speech-to-text/supported-languages). | | ```response_format``` | string | No | json | The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.<br/><br/>The default value is *json*. | The speech is returned as an audio file from the previous request. ## Management APIs -Azure OpenAI is deployed as a part of the Azure AI services. All Azure AI services rely on the same set of management APIs for creation, update, and delete operations. The management APIs are also used for deploying models within an OpenAI resource. +Azure OpenAI is deployed as a part of the Azure AI services. All Azure AI services rely on the same set of management APIs for creation, update, and delete operations. The management APIs are also used for deploying models within an Azure OpenAI resource. [**Management APIs reference documentation**](/rest/api/aiservices/) |
ai-services | Text To Speech Quickstart | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/text-to-speech-quickstart.md | echo export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/envi ## Clean up resources -If you want to clean up and remove an OpenAI resource, you can delete the resource. Before deleting the resource, you must first delete any deployed models. +If you want to clean up and remove an Azure OpenAI resource, you can delete the resource. Before deleting the resource, you must first delete any deployed models. - [Portal](../multi-service-resource.md?pivots=azportal#clean-up-resources) - [Azure CLI](../multi-service-resource.md?pivots=azcli#clean-up-resources) |
ai-services | Embeddings | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/tutorials/embeddings.md | Using this approach, you can use embeddings as a search mechanism across documen ## Clean up resources -If you created an OpenAI resource solely for completing this tutorial and want to clean up and remove an OpenAI resource, you'll need to delete your deployed models, and then delete the resource or associated resource group if it's dedicated to your test resource. Deleting the resource group also deletes any other resources associated with it. +If you created an Azure OpenAI resource solely for completing this tutorial and want to clean up and remove an Azure OpenAI resource, you'll need to delete your deployed models, and then delete the resource or associated resource group if it's dedicated to your test resource. Deleting the resource group also deletes any other resources associated with it. - [Portal](../../multi-service-resource.md?pivots=azportal#clean-up-resources) - [Azure CLI](../../multi-service-resource.md?pivots=azcli#clean-up-resources) |
ai-services | Use Your Data Quickstart | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/use-your-data-quickstart.md | In this quickstart you can use your own data with Azure OpenAI models. Using Azu ## Clean up resources -If you want to clean up and remove an OpenAI or Azure AI Search resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. +If you want to clean up and remove an Azure OpenAI or Azure AI Search resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. - [Azure AI services resources](../multi-service-resource.md?pivots=azportal#clean-up-resources) - [Azure AI Search resources](/azure/search/search-get-started-portal#clean-up-resources) |
ai-services | Whats New | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/whats-new.md | New training course: } ``` -**Content filtering is temporarily off** by default. Azure content moderation works differently than OpenAI. Azure OpenAI runs content filters during the generation call to detect harmful or abusive content and filters them from the response. [Learn MoreΓÇï](./concepts/content-filter.md) +**Content filtering is temporarily off** by default. Azure content moderation works differently than Azure OpenAI. Azure OpenAI runs content filters during the generation call to detect harmful or abusive content and filters them from the response. [Learn MoreΓÇï](./concepts/content-filter.md) ΓÇïThese models will be re-enabled in Q1 2023 and be on by default. ΓÇï |
ai-services | Whisper Quickstart | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/openai/whisper-quickstart.md | To successfully make a call against Azure OpenAI, you'll need an **endpoint** an Go to your resource in the Azure portal. The **Endpoint and Keys** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption. Create and assign persistent environment variables for your key and endpoint. echo export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/envi ## Clean up resources -If you want to clean up and remove an OpenAI resource, you can delete the resource. Before deleting the resource, you must first delete any deployed models. +If you want to clean up and remove an Azure OpenAI resource, you can delete the resource. Before deleting the resource, you must first delete any deployed models. - [Portal](../multi-service-resource.md?pivots=azportal#clean-up-resources) - [Azure CLI](../multi-service-resource.md?pivots=azcli#clean-up-resources) |
ai-services | Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/qnamaker/Overview/overview.md | keywords: "qna maker, low code chat bots, multi-turn conversations" # What is QnA Maker? +> [!NOTE] +> [Azure Open AI On Your Data](../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to QnA Maker. If you wish to migrate your QnA Maker project to Azure Open AI On Your Data, please check out our [guide](../How-To/migrate-to-openai.md). + [!INCLUDE [Custom question answering](../includes/new-version.md)] [!INCLUDE [Azure AI services rebrand](../../includes/rebrand-note.md)] |
ai-services | Add Question Metadata Portal | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/qnamaker/Quickstarts/add-question-metadata-portal.md | +> [!NOTE] +> [Azure Open AI On Your Data](../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to QnA Maker. If you wish to migrate your QnA Maker project to Azure Open AI On Your Data, please check out our [guide](../How-To/migrate-to-openai.md). + Once a knowledge base is created, add question and answer (QnA) pairs with metadata to filter the answer. The questions in the following table are about Azure service limits, but each has to do with a different Azure search service. [!INCLUDE [Custom question answering](../includes/new-version.md)] |
ai-services | Create Publish Knowledge Base | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/qnamaker/Quickstarts/create-publish-knowledge-base.md | +> [!NOTE] +> [Azure Open AI On Your Data](../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to QnA Maker. If you wish to migrate your QnA Maker project to Azure Open AI On Your Data, please check out our [guide](../How-To/migrate-to-openai.md). + [!INCLUDE [Custom question answering](../includes/new-version.md)] You can create a QnA Maker knowledge base (KB) from your own content, such as FAQs or product manuals. This article includes an example of creating a QnA Maker knowledge base from a simple FAQ webpage, to answer questions. |
ai-services | Get Answer From Knowledge Base Using Url Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/qnamaker/Quickstarts/get-answer-from-knowledge-base-using-url-tool.md | Last updated 01/19/2024 # Get an answer from a QNA Maker knowledge base +> [!NOTE] +> [Azure Open AI On Your Data](../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to QnA Maker. If you wish to migrate your QnA Maker project to Azure Open AI On Your Data, please check out our [guide](../How-To/migrate-to-openai.md). + [!INCLUDE [Custom question answering](../includes/new-version.md)] > [!NOTE] |
ai-services | Quickstart Sdk | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/qnamaker/Quickstarts/quickstart-sdk.md | zone_pivot_groups: qnamaker-quickstart # Quickstart: QnA Maker client library +> [!NOTE] +> [Azure Open AI On Your Data](../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to QnA Maker. If you wish to migrate your QnA Maker project to Azure Open AI On Your Data, please check out our [guide](../How-To/migrate-to-openai.md). + Get started with the QnA Maker client library. Follow these steps to install the package and try out the example code for basic tasks. [!INCLUDE [Custom question answering](../includes/new-version.md)] |
ai-services | Rest Api Resources | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/reference/rest-api-resources.md | Select a service from the table to learn how it can help you meet your developme | Service documentation | Description | Reference documentation | | : | : | : |-| ![Azure AI Search icon](../../ai-services/media/service-icons/search.svg) [Azure AI Search](../../search/index.yml) | Bring AI-powered cloud search to your mobile and web apps | [Azure AI Search API](/rest/api/searchservice) | -| ![Azure OpenAI Service icon](../../ai-services/medi)</br>• [fine-tuning](/rest/api/azureopenai/fine-tuning) | -| ![Bot service icon](../../ai-services/media/service-icons/bot-services.svg) [Bot Service](/composer/) | Create bots and connect them across channels | [Bot Service API](/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0&preserve-view=true) | -| ![Content Safety icon](../../ai-services/media/service-icons/content-safety.svg) [Content Safety](../../ai-services/content-safety/index.yml) | An AI service that detects unwanted contents | [Content Safety API](https://westus.dev.cognitive.microsoft.com/docs/services/content-safety-service-2023-10-15-preview/operations/TextBlocklists_AddOrUpdateBlocklistItems) | -| ![Custom Vision icon](../../ai-services/media/service-icons/custom-vision.svg) [Custom Vision](../../ai-services/custom-vision-service/index.yml) | Customize image recognition for your business applications. |**Custom Vision APIs**<br>• [prediction](https://westus2.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Prediction_3.1/operations/5eb37d24548b571998fde5f3)<br>• [training](https://westus2.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Training_3.3/operations/5eb0bcc6548b571998fddebd)| -| ![Document Intelligence icon](../../ai-services/media/service-icons/document-intelligence.svg) [Document Intelligence](../../ai-services/document-intelligence/index.yml) | Turn documents into intelligent data-driven solutions | [Document Intelligence API](/rest/api/aiservices/document-models?view=rest-aiservices-2023-07-31&preserve-view=true) | -| ![Face icon](../../ai-services/medi) | -| ![Language icon](../../ai-services/media/service-icons/language.svg) [Language](../../ai-services/language-service/index.yml) | Build apps with industry-leading natural language understanding capabilities | [REST API](/rest/api/language/) | -| ![Speech icon](../../ai-services/medi) | -| ![Translator icon](../../ai-services/medi)| -| ![Video Indexer icon](../../ai-services/media/service-icons/video-indexer.svg) [Video Indexer](/azure/azure-video-indexer) | Extract actionable insights from your videos | [Video Indexer API](/rest/api/videoindexer/accounts?view=rest-videoindexer-2024-01-01&preserve-view=true) | -| ![Vision icon](../../ai-services/media/service-icons/vision.svg) [Vision](../../ai-services/computer-vision/index.yml) | Analyze content in images and videos | [Vision API](https://eastus.dev.cognitive.microsoft.com/docs/services/Cognitive_Services_Unified_Vision_API_2024-02-01/operations/61d65934cd35050c20f73ab6) | +| ![Azure AI Search icon](../media/service-icons/search.svg) [Azure AI Search](../../search/index.yml) | Bring AI-powered cloud search to your mobile and web apps | [Azure AI Search API](/rest/api/searchservice) | +| ![Azure OpenAI Service icon](../medi)</br>• [fine-tuning](/rest/api/azureopenai/fine-tuning) | +| ![Bot service icon](../media/service-icons/bot-services.svg) [Bot Service](/composer/) | Create bots and connect them across channels | [Bot Service API](/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0&preserve-view=true) | +| ![Content Safety icon](../media/service-icons/content-safety.svg) [Content Safety](../content-safety/index.yml) | An AI service that detects unwanted contents | [Content Safety API](https://westus.dev.cognitive.microsoft.com/docs/services/content-safety-service-2023-10-15-preview/operations/TextBlocklists_AddOrUpdateBlocklistItems) | +| ![Custom Vision icon](../media/service-icons/custom-vision.svg) [Custom Vision](../custom-vision-service/index.yml) | Customize image recognition for your business applications. |**Custom Vision APIs**<br>• [prediction](https://westus2.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Prediction_3.1/operations/5eb37d24548b571998fde5f3)<br>• [training](https://westus2.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Training_3.3/operations/5eb0bcc6548b571998fddebd)| +| ![Document Intelligence icon](../media/service-icons/document-intelligence.svg) [Document Intelligence](../document-intelligence/index.yml) | Turn documents into intelligent data-driven solutions | [Document Intelligence API](/rest/api/aiservices/document-models?view=rest-aiservices-2023-07-31&preserve-view=true) | +| ![Face icon](../medi) | +| ![Language icon](../media/service-icons/language.svg) [Language](../language-service/index.yml) | Build apps with industry-leading natural language understanding capabilities | [REST API](/rest/api/language/) | +| ![Speech icon](../medi) | +| ![Translator icon](../medi)| +| ![Video Indexer icon](../media/service-icons/video-indexer.svg) [Video Indexer](/azure/azure-video-indexer) | Extract actionable insights from your videos | [Video Indexer API](/rest/api/videoindexer/accounts?view=rest-videoindexer-2024-01-01&preserve-view=true) | +| ![Vision icon](../media/service-icons/vision.svg) [Vision](../computer-vision/index.yml) | Analyze content in images and videos | [Vision API](https://eastus.dev.cognitive.microsoft.com/docs/services/Cognitive_Services_Unified_Vision_API_2024-02-01/operations/61d65934cd35050c20f73ab6) | ## Deprecated services | Service documentation | Description | Reference documentation | | | | |-| ![Anomaly Detector icon](../../ai-services/media/service-icons/anomaly-detector.svg) [Anomaly Detector](../../ai-services/Anomaly-Detector/index.yml) <br>(deprecated 2023) | Identify potential problems early on | [Anomaly Detector API](https://westus2.dev.cognitive.microsoft.com/docs/services/AnomalyDetector-v1-1/operations/CreateMultivariateModel) | -| ![Content Moderator icon](../../ai-services/medi) | -| ![Language Understanding icon](../../ai-services/media/service-icons/luis.svg) [Language understanding (LUIS)](../../ai-services/luis/index.yml) <br>(deprecated 2023) | Understand natural language in your apps | [LUIS API](https://westus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0/operations/5cb0a9459a1fe8fa44c28dd8) | -| ![Metrics Advisor icon](../../ai-services/media/service-icons/metrics-advisor.svg) [Metrics Advisor](../../ai-services/metrics-advisor/index.yml) <br>(deprecated 2023) | An AI service that detects unwanted contents | [Metrics Advisor API](https://westus.dev.cognitive.microsoft.com/docs/services/MetricsAdvisor/operations/createDataFeed) | -| ![Personalizer icon](../../ai-services/media/service-icons/personalizer.svg) [Personalizer](../../ai-services/personalizer/index.yml) <br>(deprecated 2023) | Create rich, personalized experiences for each user | [Personalizer API](https://westus2.dev.cognitive.microsoft.com/docs/services/personalizer-api/operations/Rank) | -| ![QnA Maker icon](../../ai-services/media/service-icons/luis.svg) [QnA maker](../../ai-services/qnamaker/index.yml) <br>(deprecated 2022) | Distill information into easy-to-navigate questions and answers | [QnA Maker API](https://westus.dev.cognitive.microsoft.com/docs/services/5a93fcf85b4ccd136866eb37/operations/5ac266295b4ccd1554da75ff) | +| ![Anomaly Detector icon](../media/service-icons/anomaly-detector.svg) [Anomaly Detector](../Anomaly-Detector/index.yml) <br>(deprecated 2023) | Identify potential problems early on | [Anomaly Detector API](https://westus2.dev.cognitive.microsoft.com/docs/services/AnomalyDetector-v1-1/operations/CreateMultivariateModel) | +| ![Content Moderator icon](../medi) | +| ![Language Understanding icon](../media/service-icons/luis.svg) [Language understanding (LUIS)](../luis/index.yml) <br>(deprecated 2023) | Understand natural language in your apps | [LUIS API](https://westus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0/operations/5cb0a9459a1fe8fa44c28dd8) | +| ![Metrics Advisor icon](../media/service-icons/metrics-advisor.svg) [Metrics Advisor](../metrics-advisor/index.yml) <br>(deprecated 2023) | An AI service that detects unwanted contents | [Metrics Advisor API](https://westus.dev.cognitive.microsoft.com/docs/services/MetricsAdvisor/operations/createDataFeed) | +| ![Personalizer icon](../media/service-icons/personalizer.svg) [Personalizer](../personalizer/index.yml) <br>(deprecated 2023) | Create rich, personalized experiences for each user | [Personalizer API](https://westus2.dev.cognitive.microsoft.com/docs/services/personalizer-api/operations/Rank) | +| ![QnA Maker icon](../media/service-icons/luis.svg) [QnA maker](../qnamaker/index.yml) <br>(deprecated 2022) | Distill information into easy-to-navigate questions and answers | [QnA Maker API](https://westus.dev.cognitive.microsoft.com/docs/services/5a93fcf85b4ccd136866eb37/operations/5ac266295b4ccd1554da75ff) | ## Next steps |
ai-services | Batch Transcription Create | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/batch-transcription-create.md | With batch transcriptions, you submit [audio data](batch-transcription-audio-dat ::: zone pivot="rest-api" -To create a transcription, use the [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create) operation of the [Speech to text REST API](rest-speech-to-text.md#transcriptions). Construct the request body according to the following instructions: +To create a transcription, use the [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create) operation of the [Speech to text REST API](rest-speech-to-text.md#batch-transcription). Construct the request body according to the following instructions: - You must set either the `contentContainerUrl` or `contentUrls` property. For more information about Azure blob storage for batch transcription, see [Locate audio files for batch transcription](batch-transcription-audio-data.md). - Set the required `locale` property. This value should match the expected locale of the audio data to transcribe. You can't change the locale later. To create a transcription, use the [Transcriptions_Create](https://eastus.dev.co For more information, see [Request configuration options](#request-configuration-options). -Make an HTTP POST request that uses the URI as shown in the following [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create) example. +Make an HTTP POST request that uses the URI as shown in the following [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create) example. - Replace `YourSubscriptionKey` with your Speech resource key. - Replace `YourServiceRegion` with your Speech resource region. You should receive a response body in the following format: } ``` -The top-level `self` property in the response body is the transcription's URI. Use this URI to [get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Get) details such as the URI of the transcriptions and transcription report files. You also use this URI to [update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Update) or [delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Delete) a transcription. +The top-level `self` property in the response body is the transcription's URI. Use this URI to [get](/rest/api/speechtotext/transcriptions/get) details such as the URI of the transcriptions and transcription report files. You also use this URI to [update](/rest/api/speechtotext/transcriptions/update) or [delete](/rest/api/speechtotext/transcriptions/delete) a transcription. -You can query the status of your transcriptions with the [Transcriptions_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Get) operation. +You can query the status of your transcriptions with the [Transcriptions_Get](/rest/api/speechtotext/transcriptions/get) operation. -Call [Transcriptions_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Delete) +Call [Transcriptions_Delete](/rest/api/speechtotext/transcriptions/delete) regularly from the service, after you retrieve the results. Alternatively, set the `timeToLive` property to ensure the eventual deletion of the results. ::: zone-end spx help batch transcription ::: zone pivot="rest-api" -Here are some property options that you can use to configure a transcription when you call the [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create) operation. +Here are some property options that you can use to configure a transcription when you call the [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create) operation. | Property | Description | |-|-| Here are some property options that you can use to configure a transcription whe |`contentContainerUrl`| You can submit individual audio files or a whole storage container.<br/><br/>You must specify the audio data location by using either the `contentContainerUrl` or `contentUrls` property. For more information about Azure blob storage for batch transcription, see [Locate audio files for batch transcription](batch-transcription-audio-data.md).<br/><br/>This property isn't returned in the response.| |`contentUrls`| You can submit individual audio files or a whole storage container.<br/><br/>You must specify the audio data location by using either the `contentContainerUrl` or `contentUrls` property. For more information, see [Locate audio files for batch transcription](batch-transcription-audio-data.md).<br/><br/>This property isn't returned in the response.| |`destinationContainerUrl`|The result can be stored in an Azure container. If you don't specify a container, the Speech service stores the results in a container managed by Microsoft. When the transcription job is deleted, the transcription result data is also deleted. For more information, such as the supported security scenarios, see [Specify a destination container URL](#specify-a-destination-container-url).|-|`diarization`|Indicates that the Speech service should attempt diarization analysis on the input, which is expected to be a mono channel that contains multiple voices. The feature isn't available with stereo recordings.<br/><br/>Diarization is the process of separating speakers in audio data. The batch pipeline can recognize and separate multiple speakers on mono channel recordings.<br/><br/>Specify the minimum and maximum number of people who might be speaking. You must also set the `diarizationEnabled` property to `true`. The [transcription file](batch-transcription-get.md#transcription-result-file) contains a `speaker` entry for each transcribed phrase.<br/><br/>You need to use this property when you expect three or more speakers. For two speakers, setting `diarizationEnabled` property to `true` is enough. For an example of the property usage, see [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create).<br/><br/>The maximum number of speakers for diarization must be less than 36 and more or equal to the `minSpeakers` property. For an example, see [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create).<br/><br/>When this property is selected, source audio length can't exceed 240 minutes per file.<br/><br/>**Note**: This property is only available with Speech to text REST API version 3.1 and later. If you set this property with any previous version, such as version 3.0, it's ignored and only two speakers are identified.| +|`diarization`|Indicates that the Speech service should attempt diarization analysis on the input, which is expected to be a mono channel that contains multiple voices. The feature isn't available with stereo recordings.<br/><br/>Diarization is the process of separating speakers in audio data. The batch pipeline can recognize and separate multiple speakers on mono channel recordings.<br/><br/>Specify the minimum and maximum number of people who might be speaking. You must also set the `diarizationEnabled` property to `true`. The [transcription file](batch-transcription-get.md#transcription-result-file) contains a `speaker` entry for each transcribed phrase.<br/><br/>You need to use this property when you expect three or more speakers. For two speakers, setting `diarizationEnabled` property to `true` is enough. For an example of the property usage, see [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create).<br/><br/>The maximum number of speakers for diarization must be less than 36 and more or equal to the `minSpeakers` property. For an example, see [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create).<br/><br/>When this property is selected, source audio length can't exceed 240 minutes per file.<br/><br/>**Note**: This property is only available with Speech to text REST API version 3.1 and later. If you set this property with any previous version, such as version 3.0, it's ignored and only two speakers are identified.| |`diarizationEnabled`|Specifies that the Speech service should attempt diarization analysis on the input, which is expected to be a mono channel that contains two voices. The default value is `false`.<br/><br/>For three or more voices you also need to use property `diarization`. Use only with Speech to text REST API version 3.1 and later.<br/><br/>When this property is selected, source audio length can't exceed 240 minutes per file.| |`displayName`|The name of the batch transcription. Choose a name that you can refer to later. The display name doesn't have to be unique.<br/><br/>This property is required.| |`displayFormWordLevelTimestampsEnabled`|Specifies whether to include word-level timestamps on the display form of the transcription results. The results are returned in the `displayWords` property of the transcription file. The default value is `false`.<br/><br/>**Note**: This property is only available with Speech to text REST API version 3.1 and later.| Here are some property options that you can use to configure a transcription whe |`model`|You can set the `model` property to use a specific base model or [custom speech](how-to-custom-speech-train-model.md) model. If you don't specify the `model`, the default base model for the locale is used. For more information, see [Use a custom model](#use-a-custom-model) and [Use a Whisper model](#use-a-whisper-model).| |`profanityFilterMode`|Specifies how to handle profanity in recognition results. Accepted values are `None` to disable profanity filtering, `Masked` to replace profanity with asterisks, `Removed` to remove all profanity from the result, or `Tags` to add profanity tags. The default value is `Masked`. | |`punctuationMode`|Specifies how to handle punctuation in recognition results. Accepted values are `None` to disable punctuation, `Dictated` to imply explicit (spoken) punctuation, `Automatic` to let the decoder deal with punctuation, or `DictatedAndAutomatic` to use dictated and automatic punctuation. The default value is `DictatedAndAutomatic`.<br/><br/>This property isn't applicable for Whisper models.|-|`timeToLive`|A duration after the transcription job is created, when the transcription results will be automatically deleted. The value is an ISO 8601 encoded duration. For example, specify `PT12H` for 12 hours. As an alternative, you can call [Transcriptions_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Delete) regularly after you retrieve the transcription results.| +|`timeToLive`|A duration after the transcription job is created, when the transcription results will be automatically deleted. The value is an ISO 8601 encoded duration. For example, specify `PT12H` for 12 hours. As an alternative, you can call [Transcriptions_Delete](/rest/api/speechtotext/transcriptions/delete) regularly after you retrieve the transcription results.| |`wordLevelTimestampsEnabled`|Specifies if word level timestamps should be included in the output. The default value is `false`.<br/><br/>This property isn't applicable for Whisper models. Whisper is a display-only model, so the lexical field isn't populated in the transcription.| To use a Whisper model for batch transcription, you need to set the `model` prop > [!IMPORTANT] > For Whisper models, you should always use [version 3.2](./migrate-v3-1-to-v3-2.md) of the speech to text API. -Whisper models by batch transcription are supported in the East US, Southeast Asia, and West Europe regions. +Whisper models by batch transcription are supported in the Australia East, Central US, East US, North Central US, South Central US, Southeast Asia, and West Europe regions. ::: zone pivot="rest-api"-You can make a [Models_ListBaseModels](https://westus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Models_ListBaseModels) request to get available base models for all locales. +You can make a [Models_ListBaseModels](/rest/api/speechtotext/models/list-base-models) request to get available base models for all locales. Make an HTTP GET request as shown in the following example for the `eastus` region. Replace `YourSubscriptionKey` with your Speech resource key. Replace `eastus` if you're using a different region. |
ai-services | Batch Transcription Get | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/batch-transcription-get.md | To get transcription results, first check the [status](#get-transcription-status ::: zone pivot="rest-api" -To get the status of the transcription job, call the [Transcriptions_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Get) operation of the [Speech to text REST API](rest-speech-to-text.md). +To get the status of the transcription job, call the [Transcriptions_Get](/rest/api/speechtotext/transcriptions/get) operation of the [Speech to text REST API](rest-speech-to-text.md). > [!IMPORTANT] > Batch transcription jobs are scheduled on a best-effort basis. At peak hours, it may take up to 30 minutes or longer for a transcription job to start processing. Most of the time during the execution the transcription status will be `Running`. This is because the job is assigned the `Running` status the moment it moves to the batch transcription backend system. When the base model is used, this assignment happens almost immediately; it's slightly slower for custom models. Thus, the amount of time a transcription job spends in the `Running` state doesn't correspond to the actual transcription time but also includes waiting time in the internal queues. spx help batch transcription ::: zone pivot="rest-api" -The [Transcriptions_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListFiles) operation returns a list of result files for a transcription. A [transcription report](#transcription-report-file) file is provided for each submitted batch transcription job. In addition, one [transcription](#transcription-result-file) file (the end result) is provided for each successfully transcribed audio file. +The [Transcriptions_ListFiles](/rest/api/speechtotext/transcriptions/list-files) operation returns a list of result files for a transcription. A [transcription report](#transcription-report-file) file is provided for each submitted batch transcription job. In addition, one [transcription](#transcription-result-file) file (the end result) is provided for each successfully transcribed audio file. Make an HTTP GET request using the "files" URI from the previous response body. Replace `YourTranscriptionId` with your transcription ID, replace `YourSubscriptionKey` with your Speech resource key, and replace `YourServiceRegion` with your Speech resource region. |
ai-services | Batch Transcription | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/batch-transcription.md | -Batch transcription is used to transcribe a large amount of audio data in storage. Both the [Speech to text REST API](rest-speech-to-text.md#transcriptions) and [Speech CLI](spx-basics.md) support batch transcription. +Batch transcription is used to transcribe a large amount of audio data in storage. Both the [Speech to text REST API](rest-speech-to-text.md#batch-transcription) and [Speech CLI](spx-basics.md) support batch transcription. You should provide multiple files per request or point to an Azure Blob Storage container with the audio files to transcribe. The batch transcription service can handle a large number of submitted transcriptions. The service transcribes the files concurrently, which reduces the turnaround time. |
ai-services | Bring Your Own Storage Speech Resource Speech To Text | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/bring-your-own-storage-speech-resource-speech-to-text.md | Speech service uses `customspeech-artifacts` Blob container in the BYOS-associat ### Get Batch transcription results via REST API -[Speech to text REST API](rest-speech-to-text.md) fully supports BYOS-enabled Speech resources. However, because the data is now stored within the BYOS-enabled Storage account, requests like [Get Transcription Files](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListFiles) interact with the BYOS-associated Storage account Blob storage, instead of Speech service internal resources. It allows using the same REST API based code for both "regular" and BYOS-enabled Speech resources. +[Speech to text REST API](rest-speech-to-text.md) fully supports BYOS-enabled Speech resources. However, because the data is now stored within the BYOS-enabled Storage account, requests like [Get Transcription Files](/rest/api/speechtotext/transcriptions/list-files) interact with the BYOS-associated Storage account Blob storage, instead of Speech service internal resources. It allows using the same REST API based code for both "regular" and BYOS-enabled Speech resources. -For maximum security use the `sasValidityInSeconds` parameter with the value set to `0` in the requests, that return data file URLs, like [Get Transcription Files](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListFiles) request. Here's an example request URL: +For maximum security use the `sasValidityInSeconds` parameter with the value set to `0` in the requests, that return data file URLs, like [Get Transcription Files](/rest/api/speechtotext/transcriptions/list-files) request. Here's an example request URL: ```https https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/3b24ca19-2eb1-4a2a-b964-35d89eca486b/files?sasValidityInSeconds=0 Such a request returns direct Storage Account URLs to data files (without SAS or URL of this format ensures that only Microsoft Entra identities (users, service principals, managed identities) with sufficient access rights (like *Storage Blob Data Reader* role) can access the data from the URL. > [!WARNING]-> If `sasValidityInSeconds` parameter is omitted in [Get Transcription Files](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListFiles) request or similar ones, then a [User delegation SAS](../../storage/common/storage-sas-overview.md) with the validity of 30 days will be generated for each data file URL returned. This SAS is signed by the system assigned managed identity of your BYOS-enabled Speech resource. Because of it, the SAS allows access to the data, even if storage account key access is disabled. See details [here](../../storage/common/shared-key-authorization-prevent.md#understand-how-disallowing-shared-key-affects-sas-tokens). +> If `sasValidityInSeconds` parameter is omitted in [Get Transcription Files](/rest/api/speechtotext/transcriptions/list-files) request or similar ones, then a [User delegation SAS](../../storage/common/storage-sas-overview.md) with the validity of 30 days will be generated for each data file URL returned. This SAS is signed by the system assigned managed identity of your BYOS-enabled Speech resource. Because of it, the SAS allows access to the data, even if storage account key access is disabled. See details [here](../../storage/common/shared-key-authorization-prevent.md#understand-how-disallowing-shared-key-affects-sas-tokens). ## Real-time transcription with audio and transcription result logging enabled If you use BYOS, then you find the logs in `customspeech-audiologs` Blob contain ### Get real-time transcription logs via REST API -[Speech to text REST API](rest-speech-to-text.md) fully supports BYOS-enabled Speech resources. However, because the data is now stored within the BYOS-enabled Storage account, requests like [Get Base Model Logs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListBaseModelLogs) interact with the BYOS-associated Storage account Blob storage, instead of Speech service internal resources. It allows using the same REST API based code for both "regular" and BYOS-enabled Speech resources. +[Speech to text REST API](rest-speech-to-text.md) fully supports BYOS-enabled Speech resources. However, because the data is now stored within the BYOS-enabled Storage account, requests like [Get Base Model Logs](/rest/api/speechtotext/endpoints/list-base-model-logs) interact with the BYOS-associated Storage account Blob storage, instead of Speech service internal resources. It allows using the same REST API based code for both "regular" and BYOS-enabled Speech resources. -For maximum security use the `sasValidityInSeconds` parameter with the value set to `0` in the requests, that return data file URLs, like [Get Base Model Logs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListBaseModelLogs) request. Here's an example request URL: +For maximum security use the `sasValidityInSeconds` parameter with the value set to `0` in the requests, that return data file URLs, like [Get Base Model Logs](/rest/api/speechtotext/endpoints/list-base-model-logs) request. Here's an example request URL: ```https https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/base/en-US/files/logs?sasValidityInSeconds=0 Such a request returns direct Storage Account URLs to data files (without SAS or URL of this format ensures that only Microsoft Entra identities (users, service principals, managed identities) with sufficient access rights (like *Storage Blob Data Reader* role) can access the data from the URL. > [!WARNING]-> If `sasValidityInSeconds` parameter is omitted in [Get Base Model Logs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListBaseModelLogs) request or similar ones, then a [User delegation SAS](../../storage/common/storage-sas-overview.md) with the validity of 30 days will be generated for each data file URL returned. This SAS is signed by the system assigned managed identity of your BYOS-enabled Speech resource. Because of it, the SAS allows access to the data, even if storage account key access is disabled. See details [here](../../storage/common/shared-key-authorization-prevent.md#understand-how-disallowing-shared-key-affects-sas-tokens). +> If `sasValidityInSeconds` parameter is omitted in [Get Base Model Logs](/rest/api/speechtotext/endpoints/list-base-model-logs) request or similar ones, then a [User delegation SAS](../../storage/common/storage-sas-overview.md) with the validity of 30 days will be generated for each data file URL returned. This SAS is signed by the system assigned managed identity of your BYOS-enabled Speech resource. Because of it, the SAS allows access to the data, even if storage account key access is disabled. See details [here](../../storage/common/shared-key-authorization-prevent.md#understand-how-disallowing-shared-key-affects-sas-tokens). ## Custom speech The Blob container structure is provided for your information only and subject t ### Use of REST API with custom speech -[Speech to text REST API](rest-speech-to-text.md) fully supports BYOS-enabled Speech resources. However, because the data is now stored within the BYOS-enabled Storage account, requests like [Get Dataset Files](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListFiles) interact with the BYOS-associated Storage account Blob storage, instead of Speech service internal resources. It allows using the same REST API based code for both "regular" and BYOS-enabled Speech resources. +[Speech to text REST API](rest-speech-to-text.md) fully supports BYOS-enabled Speech resources. However, because the data is now stored within the BYOS-enabled Storage account, requests like [Datasets_ListFiles](/rest/api/speechtotext/datasets/list-files) interact with the BYOS-associated Storage account Blob storage, instead of Speech service internal resources. It allows using the same REST API based code for both "regular" and BYOS-enabled Speech resources. -For maximum security use the `sasValidityInSeconds` parameter with the value set to `0` in the requests, that return data file URLs, like [Get Dataset Files](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListFiles) request. Here's an example request URL: +For maximum security use the `sasValidityInSeconds` parameter with the value set to `0` in the requests, that return data file URLs, like [Get Dataset Files](/rest/api/speechtotext/datasets/list-files) request. Here's an example request URL: ```https https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/8427b92a-cb50-4cda-bf04-964ea1b1781b/files?sasValidityInSeconds=0 Such a request returns direct Storage Account URLs to data files (without SAS or URL of this format ensures that only Microsoft Entra identities (users, service principals, managed identities) with sufficient access rights (like *Storage Blob Data Reader* role) can access the data from the URL. > [!WARNING]-> If `sasValidityInSeconds` parameter is omitted in [Get Dataset Files](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListFiles) request or similar ones, then a [User delegation SAS](../../storage/common/storage-sas-overview.md) with the validity of 30 days will be generated for each data file URL returned. This SAS is signed by the system assigned managed identity of your BYOS-enabled Speech resource. Because of it, the SAS allows access to the data, even if storage account key access is disabled. See details [here](../../storage/common/shared-key-authorization-prevent.md#understand-how-disallowing-shared-key-affects-sas-tokens). +> If `sasValidityInSeconds` parameter is omitted in [Get Dataset Files](/rest/api/speechtotext/datasets/list-files) request or similar ones, then a [User delegation SAS](../../storage/common/storage-sas-overview.md) with the validity of 30 days will be generated for each data file URL returned. This SAS is signed by the system assigned managed identity of your BYOS-enabled Speech resource. Because of it, the SAS allows access to the data, even if storage account key access is disabled. See details [here](../../storage/common/shared-key-authorization-prevent.md#understand-how-disallowing-shared-key-affects-sas-tokens). ## Next steps |
ai-services | Embedded Speech | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/embedded-speech.md | Follow these steps to install the Speech SDK for Java using Apache Maven: <dependency> <groupId>com.microsoft.cognitiveservices.speech</groupId> <artifactId>client-sdk-embedded</artifactId>- <version>1.36.0</version> + <version>1.37.0</version> </dependency> </dependencies> </project> Be sure to use the `@aar` suffix when the dependency is specified in `build.grad ``` dependencies {- implementation 'com.microsoft.cognitiveservices.speech:client-sdk-embedded:1.36.0@aar' + implementation 'com.microsoft.cognitiveservices.speech:client-sdk-embedded:1.37.0@aar' } ``` ::: zone-end |
ai-services | Get Started Intent Recognition | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/get-started-intent-recognition.md | |
ai-services | How To Custom Speech Create Project | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-create-project.md | spx help csr project ::: zone pivot="rest-api" -To create a project, use the [Projects_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To create a project, use the [Projects_Create](/rest/api/speechtotext/projects/create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: - Set the required `locale` property. This should be the locale of the contained datasets. The locale can't be changed later. - Set the required `displayName` property. This is the project name that is displayed in the Speech Studio. -Make an HTTP POST request using the URI as shown in the following [Projects_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Create) example. Replace `YourSubscriptionKey` with your Speech resource key, replace `YourServiceRegion` with your Speech resource region, and set the request body properties as previously described. +Make an HTTP POST request using the URI as shown in the following [Projects_Create](/rest/api/speechtotext/projects/create) example. Replace `YourSubscriptionKey` with your Speech resource key, replace `YourServiceRegion` with your Speech resource region, and set the request body properties as previously described. ```azurecli-interactive curl -v -X POST -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey" -H "Content-Type: application/json" -d '{ You should receive a response body in the following format: } ``` -The top-level `self` property in the response body is the project's URI. Use this URI to [get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Get) details about the project's evaluations, datasets, models, endpoints, and transcriptions. You also use this URI to [update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Update) or [delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Delete) a project. +The top-level `self` property in the response body is the project's URI. Use this URI to [get](/rest/api/speechtotext/projects/get) details about the project's evaluations, datasets, models, endpoints, and transcriptions. You also use this URI to [update](/rest/api/speechtotext/projects/update) or [delete](/rest/api/speechtotext/projects/delete) a project. ::: zone-end |
ai-services | How To Custom Speech Deploy Model | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-deploy-model.md | spx help csr endpoint ::: zone pivot="rest-api" -To create an endpoint and deploy a model, use the [Endpoints_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To create an endpoint and deploy a model, use the [Endpoints_Create](/rest/api/speechtotext/endpoints/create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: -- Set the `project` property to the URI of an existing project. This is recommended so that you can also view and manage the endpoint in Speech Studio. You can make a [Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List) request to get available projects.+- Set the `project` property to the URI of an existing project. This is recommended so that you can also view and manage the endpoint in Speech Studio. You can make a [Projects_List](/rest/api/speechtotext/projects/list) request to get available projects. - Set the required `model` property to the URI of the model that you want deployed to the endpoint. - Set the required `locale` property. The endpoint locale must match the locale of the model. The locale can't be changed later. - Set the required `displayName` property. This is the name that is displayed in the Speech Studio. - Optionally, you can set the `loggingEnabled` property within `properties`. Set this to `true` to enable audio and diagnostic [logging](#view-logging-data) of the endpoint's traffic. The default is `false`. -Make an HTTP POST request using the URI as shown in the following [Endpoints_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Create) example. Replace `YourSubscriptionKey` with your Speech resource key, replace `YourServiceRegion` with your Speech resource region, and set the request body properties as previously described. +Make an HTTP POST request using the URI as shown in the following [Endpoints_Create](/rest/api/speechtotext/endpoints/create) example. Replace `YourSubscriptionKey` with your Speech resource key, replace `YourServiceRegion` with your Speech resource region, and set the request body properties as previously described. ```azurecli-interactive curl -v -X POST -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey" -H "Content-Type: application/json" -d '{ You should receive a response body in the following format: } ``` -The top-level `self` property in the response body is the endpoint's URI. Use this URI to [get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Get) details about the endpoint's project, model, and logs. You also use this URI to [update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Update) or [delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Delete) the endpoint. +The top-level `self` property in the response body is the endpoint's URI. Use this URI to [get](/rest/api/speechtotext/endpoints/get) details about the endpoint's project, model, and logs. You also use this URI to [update](/rest/api/speechtotext/endpoints/update) or [delete](/rest/api/speechtotext/endpoints/delete) the endpoint. ::: zone-end spx help csr endpoint ::: zone pivot="rest-api" -To redeploy the custom endpoint with a new model, use the [Endpoints_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Update) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To redeploy the custom endpoint with a new model, use the [Endpoints_Update](/rest/api/speechtotext/endpoints/update) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: - Set the `model` property to the URI of the model that you want deployed to the endpoint. The locations of each log file with more details are returned in the response bo ::: zone pivot="rest-api" -To get logs for an endpoint, start by using the [Endpoints_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Get) operation of the [Speech to text REST API](rest-speech-to-text.md). +To get logs for an endpoint, start by using the [Endpoints_Get](/rest/api/speechtotext/endpoints/get) operation of the [Speech to text REST API](rest-speech-to-text.md). Make an HTTP GET request using the URI as shown in the following example. Replace `YourEndpointId` with your endpoint ID, replace `YourSubscriptionKey` with your Speech resource key, and replace `YourServiceRegion` with your Speech resource region. |
ai-services | How To Custom Speech Evaluate Data | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-evaluate-data.md | spx help csr evaluation ::: zone pivot="rest-api" -To create a test, use the [Evaluations_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To create a test, use the [Evaluations_Create](/rest/api/speechtotext/evaluations/create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: -- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view the test in Speech Studio. You can make a [Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List) request to get available projects.+- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view the test in Speech Studio. You can make a [Projects_List](/rest/api/speechtotext/projects/list) request to get available projects. - Set the `testingKind` property to `Evaluation` within `customProperties`. If you don't specify `Evaluation`, the test is treated as a quality inspection test. Whether the `testingKind` property is set to `Evaluation` or `Inspection`, or not set, you can access the accuracy scores via the API, but not in the Speech Studio. - Set the required `model1` property to the URI of a model that you want to test. - Set the required `model2` property to the URI of another model that you want to test. If you don't want to compare two models, use the same model for both `model1` and `model2`. You should receive a response body in the following format: } ``` -The top-level `self` property in the response body is the evaluation's URI. Use this URI to [get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Get) details about the evaluation's project and test results. You also use this URI to [update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Update) or [delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Delete) the evaluation. +The top-level `self` property in the response body is the evaluation's URI. Use this URI to [get](/rest/api/speechtotext/evaluations/get) details about the evaluation's project and test results. You also use this URI to [update](/rest/api/speechtotext/evaluations/update) or [delete](/rest/api/speechtotext/evaluations/delete) the evaluation. ::: zone-end spx help csr evaluation ::: zone pivot="rest-api" -To get test results, start by using the [Evaluations_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Get) operation of the [Speech to text REST API](rest-speech-to-text.md). +To get test results, start by using the [Evaluations_Get](/rest/api/speechtotext/evaluations/get) operation of the [Speech to text REST API](rest-speech-to-text.md). Make an HTTP GET request using the URI as shown in the following example. Replace `YourEvaluationId` with your evaluation ID, replace `YourSubscriptionKey` with your Speech resource key, and replace `YourServiceRegion` with your Speech resource region. |
ai-services | How To Custom Speech Inspect Data | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-inspect-data.md | spx help csr evaluation ::: zone pivot="rest-api" -To create a test, use the [Evaluations_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To create a test, use the [Evaluations_Create](/rest/api/speechtotext/evaluations/create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: -- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view the test in Speech Studio. You can make a [Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List) request to get available projects.+- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view the test in Speech Studio. You can make a [Projects_List](/rest/api/speechtotext/projects/list) request to get available projects. - Set the required `model1` property to the URI of a model that you want to test. - Set the required `model2` property to the URI of another model that you want to test. If you don't want to compare two models, use the same model for both `model1` and `model2`. - Set the required `dataset` property to the URI of a dataset that you want to use for the test. You should receive a response body in the following format: } ``` -The top-level `self` property in the response body is the evaluation's URI. Use this URI to [get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Get) details about the evaluation's project and test results. You also use this URI to [update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Update) or [delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Delete) the evaluation. +The top-level `self` property in the response body is the evaluation's URI. Use this URI to [get](/rest/api/speechtotext/evaluations/get) details about the evaluation's project and test results. You also use this URI to [update](/rest/api/speechtotext/evaluations/update) or [delete](/rest/api/speechtotext/evaluations/delete) the evaluation. ::: zone-end spx help csr evaluation ::: zone pivot="rest-api" -To get test results, start by using the [Evaluations_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Get) operation of the [Speech to text REST API](rest-speech-to-text.md). +To get test results, start by using the [Evaluations_Get](/rest/api/speechtotext/evaluations/get) operation of the [Speech to text REST API](rest-speech-to-text.md). Make an HTTP GET request using the URI as shown in the following example. Replace `YourEvaluationId` with your evaluation ID, replace `YourSubscriptionKey` with your Speech resource key, and replace `YourServiceRegion` with your Speech resource region. |
ai-services | How To Custom Speech Model And Endpoint Lifecycle | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-model-and-endpoint-lifecycle.md | When a custom model or base model expires, it's no longer available for transcri |Transcription route |Expired model result |Recommendation | |||| |Custom endpoint|Speech recognition requests fall back to the most recent base model for the same [locale](language-support.md?tabs=stt). You get results, but recognition might not accurately transcribe your domain data. |Update the endpoint's model as described in the [Deploy a custom speech model](how-to-custom-speech-deploy-model.md) guide. |-|Batch transcription |[Batch transcription](batch-transcription.md) requests for expired models fail with a 4xx error. |In each [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create) REST API request body, set the `model` property to a base model or custom model that isn't expired. Otherwise don't include the `model` property to always use the latest base model. | +|Batch transcription |[Batch transcription](batch-transcription.md) requests for expired models fail with a 4xx error. |In each [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create) REST API request body, set the `model` property to a base model or custom model that isn't expired. Otherwise don't include the `model` property to always use the latest base model. | ## Get base model expiration dates spx help csr model ::: zone pivot="rest-api" -To get the training and transcription expiration dates for a base model, use the [Models_GetBaseModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetBaseModel) operation of the [Speech to text REST API](rest-speech-to-text.md). You can make a [Models_ListBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListBaseModels) request to get available base models for all locales. +To get the training and transcription expiration dates for a base model, use the [Models_GetBaseModel](/rest/api/speechtotext/models/get-base-model) operation of the [Speech to text REST API](rest-speech-to-text.md). You can make a [Models_ListBaseModels](/rest/api/speechtotext/models/list-base-models) request to get available base models for all locales. Make an HTTP GET request using the model URI as shown in the following example. Replace `BaseModelId` with your model ID, replace `YourSubscriptionKey` with your Speech resource key, and replace `YourServiceRegion` with your Speech resource region. spx help csr model ::: zone pivot="rest-api" -To get the transcription expiration date for your custom model, use the [Models_GetCustomModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetCustomModel) operation of the [Speech to text REST API](rest-speech-to-text.md). +To get the transcription expiration date for your custom model, use the [Models_GetCustomModel](/rest/api/speechtotext/models/get-custom-model) operation of the [Speech to text REST API](rest-speech-to-text.md). Make an HTTP GET request using the model URI as shown in the following example. Replace `YourModelId` with your model ID, replace `YourSubscriptionKey` with your Speech resource key, and replace `YourServiceRegion` with your Speech resource region. |
ai-services | How To Custom Speech Test And Train | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-test-and-train.md | Training with plain text or structured text usually finishes within a few minute > > Start with small sets of sample data that match the language, acoustics, and hardware where your model will be used. Small datasets of representative data can expose problems before you invest in gathering larger datasets for training. For sample custom speech data, see <a href="https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/sampledata/customspeech" target="_target">this GitHub repository</a>. -If you train a custom model with audio data, choose a Speech resource region with dedicated hardware for training audio data. For more information, see footnotes in the [regions](regions.md#speech-service) table. In regions with dedicated hardware for custom speech training, the Speech service uses up to 20 hours of your audio training data, and can process about 10 hours of data per day. In other regions, the Speech service uses up to 8 hours of your audio data, and can process about 1 hour of data per day. After the model is trained, you can copy the model to another region as needed with the [Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_CopyTo) REST API. +If you train a custom model with audio data, choose a Speech resource region with dedicated hardware for training audio data. For more information, see footnotes in the [regions](regions.md#speech-service) table. In regions with dedicated hardware for custom speech training, the Speech service uses up to 20 hours of your audio training data, and can process about 10 hours of data per day. In other regions, the Speech service uses up to 8 hours of your audio data, and can process about 1 hour of data per day. After the model is trained, you can copy the model to another region as needed with the [Models_CopyTo](/rest/api/speechtotext/models/copy-to) REST API. ## Consider datasets by scenario |
ai-services | How To Custom Speech Train Model | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-train-model.md | spx help csr model ::: zone pivot="rest-api" -To create a model with datasets for training, use the [Models_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To create a model with datasets for training, use the [Models_Create](/rest/api/speechtotext/models/create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: -- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view and manage the model in Speech Studio. You can make a [Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List) request to get available projects.+- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view and manage the model in Speech Studio. You can make a [Projects_List](/rest/api/speechtotext/projects/list) request to get available projects. - Set the required `datasets` property to the URI of the datasets that you want used for training. - Set the required `locale` property. The model locale must match the locale of the project and base model. The locale can't be changed later. - Set the required `displayName` property. This property is the name that is displayed in the Speech Studio. You should receive a response body in the following format: > > Take note of the date in the `transcriptionDateTime` property. This is the last date that you can use your custom model for speech recognition. For more information, see [Model and endpoint lifecycle](./how-to-custom-speech-model-and-endpoint-lifecycle.md). -The top-level `self` property in the response body is the model's URI. Use this URI to [get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetCustomModel) details about the model's project, manifest, and deprecation dates. You also use this URI to [update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Update) or [delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Delete) the model. +The top-level `self` property in the response body is the model's URI. Use this URI to [get](/rest/api/speechtotext/models/get-custom-model) details about the model's project, manifest, and deprecation dates. You also use this URI to [update](/rest/api/speechtotext/models/update) or [delete](/rest/api/speechtotext/models/delete) the model. ::: zone-end Copying a model directly to a project in another region isn't supported with the ::: zone pivot="rest-api" -To copy a model to another Speech resource, use the [Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_CopyTo) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To copy a model to another Speech resource, use the [Models_CopyTo](/rest/api/speechtotext/models/copy-to) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: - Set the required `targetSubscriptionKey` property to the key of the destination Speech resource. spx help csr model ::: zone pivot="rest-api" -To connect a new model to a project of the Speech resource where the model was copied, use the [Models_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Update) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To connect a new model to a project of the Speech resource where the model was copied, use the [Models_Update](/rest/api/speechtotext/models/update) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: -- Set the required `project` property to the URI of an existing project. This property is recommended so that you can also view and manage the model in Speech Studio. You can make a [Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List) request to get available projects.+- Set the required `project` property to the URI of an existing project. This property is recommended so that you can also view and manage the model in Speech Studio. You can make a [Projects_List](/rest/api/speechtotext/projects/list) request to get available projects. -Make an HTTP PATCH request using the URI as shown in the following example. Use the URI of the new model. You can get the new model ID from the `self` property of the [Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_CopyTo) response body. Replace `YourSubscriptionKey` with your Speech resource key, replace `YourServiceRegion` with your Speech resource region, and set the request body properties as previously described. +Make an HTTP PATCH request using the URI as shown in the following example. Use the URI of the new model. You can get the new model ID from the `self` property of the [Models_CopyTo](/rest/api/speechtotext/models/copy-to) response body. Replace `YourSubscriptionKey` with your Speech resource key, replace `YourServiceRegion` with your Speech resource region, and set the request body properties as previously described. ```azurecli-interactive curl -v -X PATCH -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey" -H "Content-Type: application/json" -d '{ |
ai-services | How To Custom Speech Upload Data | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-custom-speech-upload-data.md | spx help csr dataset [!INCLUDE [Map CLI and API kind to Speech Studio options](includes/how-to/custom-speech/cli-api-kind.md)] -To create a dataset and connect it to an existing project, use the [Datasets_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To create a dataset and connect it to an existing project, use the [Datasets_Create](/rest/api/speechtotext/datasets/create) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: -- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view and manage the dataset in Speech Studio. You can make a [Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List) request to get available projects.+- Set the `project` property to the URI of an existing project. This property is recommended so that you can also view and manage the dataset in Speech Studio. You can make a [Projects_List](/rest/api/speechtotext/projects/list) request to get available projects. - Set the required `kind` property. The possible set of values for dataset kind are: Language, Acoustic, Pronunciation, and AudioFiles. - Set the required `contentUrl` property. This property is the location of the dataset. If you don't use trusted Azure services security mechanism (see next Note), then the `contentUrl` parameter should be a URL that can be retrieved with a simple anonymous GET request. For example, a [SAS URL](/azure/storage/common/storage-sas-overview) or a publicly accessible URL. URLs that require extra authorization, or expect user interaction aren't supported. You should receive a response body in the following format: } ``` -The top-level `self` property in the response body is the dataset's URI. Use this URI to [get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Get) details about the dataset's project and files. You also use this URI to [update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Update) or [delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Delete) the dataset. +The top-level `self` property in the response body is the dataset's URI. Use this URI to [get](/rest/api/speechtotext/datasets/get) details about the dataset's project and files. You also use this URI to [update](/rest/api/speechtotext/datasets/update) or [delete](/rest/api/speechtotext/datasets/delete) the dataset. ::: zone-end |
ai-services | How To Get Speech Session Id | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/how-to-get-speech-session-id.md | https://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiv [Batch transcription API](batch-transcription.md) is a subset of the [Speech to text REST API](rest-speech-to-text.md). -The required Transcription ID is the GUID value contained in the main `self` element of the Response body returned by requests, like [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create). +The required Transcription ID is the GUID value contained in the main `self` element of the Response body returned by requests, like [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create). -The following is and example response body of a [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create) request. GUID value `537216f8-0620-4a10-ae2d-00bdb423b36f` found in the first `self` element is the Transcription ID. +The following is and example response body of a [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create) request. GUID value `537216f8-0620-4a10-ae2d-00bdb423b36f` found in the first `self` element is the Transcription ID. ```json { The following is and example response body of a [Transcriptions_Create](https:// } ``` > [!NOTE]-> Use the same technique to determine different IDs required for debugging issues related to [custom speech](custom-speech-overview.md), like uploading a dataset using [Datasets_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Create) request. +> Use the same technique to determine different IDs required for debugging issues related to [custom speech](custom-speech-overview.md), like uploading a dataset using [Datasets_Create](/rest/api/speechtotext/datasets/create) request. > [!NOTE]-> You can also see all existing transcriptions and their Transcription IDs for a given Speech resource by using [Transcriptions_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Get) request. +> You can also see all existing transcriptions and their Transcription IDs for a given Speech resource by using [Transcriptions_Get](/rest/api/speechtotext/transcriptions/get) request. |
ai-services | Language Identification | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/language-identification.md | For more information about containers, see the [language identification speech c ## Implement speech to text batch transcription -To identify languages with [Batch transcription REST API](batch-transcription.md), use `languageIdentification` property in the body of your [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create) request. +To identify languages with [Batch transcription REST API](batch-transcription.md), use `languageIdentification` property in the body of your [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create) request. > [!WARNING] > Batch transcription only supports language identification for default base models. If both language identification and a custom model are specified in the transcription request, the service falls back to use the base models for the specified candidate languages. This might result in unexpected recognition results. |
ai-services | Logging Audio Transcription | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/logging-audio-transcription.md | Logging can be enabled or disabled in the persistent custom model endpoint setti You can enable audio and transcription logging for a custom model endpoint: - When you create the endpoint using the Speech Studio, REST API, or Speech CLI. For details about how to enable logging for a custom speech endpoint, see [Deploy a custom speech model](how-to-custom-speech-deploy-model.md#add-a-deployment-endpoint).-- When you update the endpoint ([Endpoints_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Update)) using the [Speech to text REST API](rest-speech-to-text.md). For an example of how to update the logging setting for an endpoint, see [Turn off logging for a custom model endpoint](#turn-off-logging-for-a-custom-model-endpoint). But instead of setting the `contentLoggingEnabled` property to `false`, set it to `true` to enable logging for the endpoint.+- When you update the endpoint ([Endpoints_Update](/rest/api/speechtotext/endpoints/update)) using the [Speech to text REST API](rest-speech-to-text.md). For an example of how to update the logging setting for an endpoint, see [Turn off logging for a custom model endpoint](#turn-off-logging-for-a-custom-model-endpoint). But instead of setting the `contentLoggingEnabled` property to `false`, set it to `true` to enable logging for the endpoint. ## Turn off logging for a custom model endpoint To disable audio and transcription logging for a custom model endpoint, you must update the persistent endpoint logging setting using the [Speech to text REST API](rest-speech-to-text.md). There isn't a way to disable logging for an existing custom model endpoint using the Speech Studio. -To turn off logging for a custom endpoint, use the [Endpoints_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Update) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: +To turn off logging for a custom endpoint, use the [Endpoints_Update](/rest/api/speechtotext/endpoints/update) operation of the [Speech to text REST API](rest-speech-to-text.md). Construct the request body according to the following instructions: - Set the `contentLoggingEnabled` property within `properties`. Set this property to `true` to enable logging of the endpoint's traffic. Set this property to `false` to disable logging of the endpoint's traffic. With this approach, you can download all available log sets at once. There's no You can download all or a subset of available log sets. This method is applicable for base and [custom model](how-to-custom-speech-deploy-model.md) endpoints. To list and download audio and transcription logs:-- Base models: Use the [Endpoints_ListBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListBaseModelLogs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored when using the default base model of a given language.-- Custom model endpoints: Use the [Endpoints_ListLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListLogs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored for a given endpoint.+- Base models: Use the [Endpoints_ListBaseModelLogs](/rest/api/speechtotext/endpoints/list-base-model-logs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored when using the default base model of a given language. +- Custom model endpoints: Use the [Endpoints_ListLogs](/rest/api/speechtotext/endpoints/list-logs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored for a given endpoint. ### Get log IDs with Speech to text REST API In some scenarios, you might need to get IDs of the available logs. For example, you might want to delete a specific log as described [later in this article](#delete-specific-log). To get IDs of the available logs:-- Base models: Use the [Endpoints_ListBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListBaseModelLogs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored when using the default base model of a given language.-- Custom model endpoints: Use the [Endpoints_ListLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListLogs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored for a given endpoint.+- Base models: Use the [Endpoints_ListBaseModelLogs](/rest/api/speechtotext/endpoints/list-base-model-logs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored when using the default base model of a given language. +- Custom model endpoints: Use the [Endpoints_ListLogs](/rest/api/speechtotext/endpoints/list-logs) operation of the [Speech to text REST API](rest-speech-to-text.md). This operation gets the list of audio and transcription logs that are stored for a given endpoint. -Here's a sample output of [Endpoints_ListLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListLogs). For simplicity, only one log set is shown: +Here's a sample output of [Endpoints_ListLogs](/rest/api/speechtotext/endpoints/list-logs). For simplicity, only one log set is shown: ```json { To delete audio and transcription logs you must use the [Speech to text REST API To delete all logs or logs for a given time frame: -- Base models: Use the [Endpoints_DeleteBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteBaseModelLogs) operation of the [Speech to text REST API](rest-speech-to-text.md). -- Custom model endpoints: Use the [Endpoints_DeleteLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteLogs) operation of the [Speech to text REST API](rest-speech-to-text.md).+- Base models: Use the [Endpoints_DeleteBaseModelLogs](/rest/api/speechtotext/endpoints/delete-base-model-logs) operation of the [Speech to text REST API](rest-speech-to-text.md). +- Custom model endpoints: Use the [Endpoints_DeleteLogs](/rest/api/speechtotext/endpoints/delete-logs) operation of the [Speech to text REST API](rest-speech-to-text.md). Optionally, set the `endDate` of the audio logs deletion (specific day, UTC). Expected format: "yyyy-mm-dd". For instance, "2023-03-15" results in deleting all logs on March 15, 2023 and before. Optionally, set the `endDate` of the audio logs deletion (specific day, UTC). Ex To delete a specific log by ID: -- Base models: Use the [Endpoints_DeleteBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteBaseModelLog) operation of the [Speech to text REST API](rest-speech-to-text.md).-- Custom model endpoints: Use the [Endpoints_DeleteLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteLog) operation of the [Speech to text REST API](rest-speech-to-text.md).+- Base models: Use the [Endpoints_DeleteBaseModelLog](/rest/api/speechtotext/endpoints/delete-base-model-log) operation of the [Speech to text REST API](rest-speech-to-text.md). +- Custom model endpoints: Use the [Endpoints_DeleteLog](/rest/api/speechtotext/endpoints/delete-log) operation of the [Speech to text REST API](rest-speech-to-text.md). For details about how to get Log IDs, see a previous section [Get log IDs with Speech to text REST API](#get-log-ids-with-speech-to-text-rest-api). |
ai-services | Migrate V2 To V3 | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/migrate-v2-to-v3.md | - Title: Migrate from v2 to v3 REST API - Speech service- -description: This document helps developers migrate code from v2 to v3 of the Speech to text REST API.speech-to-text REST API. ---- Previously updated : 1/21/2024-----# Migrate code from v2.0 to v3.0 of the REST API --> [!IMPORTANT] -> The Speech to text REST API v2.0 is retired as of February 29, 2024. Please migrate your applications to the Speech to text REST API v3.2. Complete the steps in this article and then see the Speech to text REST API [v3.0 to v3.1](migrate-v3-0-to-v3-1.md) and [v3.1 to v3.2](migrate-v3-1-to-v3-2.md) migration guides for additional requirements. --## Forward compatibility --All entities from v2.0 can also be found in the v3.0 API under the same identity. Where the schema of a result has changed (such as transcriptions), the result of a GET in the v3 version of the API uses the v3 schema. The result of a GET in the v2 version of the API uses the same v2 schema. Newly created entities on v3 aren't available in responses from v2 APIs. --## Migration steps --This is a summary list of items you need to be aware of when you're preparing for migration. Details are found in the individual links. Depending on your current use of the API not all steps listed here might apply. Only a few changes require nontrivial changes in the calling code. Most changes just require a change to item names. --General changes: --1. [Change the host name](#host-name-changes) --1. [Rename the property ID to self in your client code](#identity-of-an-entity) --1. [Change code to iterate over collections of entities](#working-with-collections-of-entities) --1. [Rename the property name to displayName in your client code](#name-of-an-entity) --1. [Adjust the retrieval of the metadata of referenced entities](#accessing-referenced-entities) --1. If you use Batch transcription: -- * [Adjust code for creating batch transcriptions](#creating-transcriptions) -- * [Adapt code to the new transcription results schema](#format-of-v3-transcription-results) -- * [Adjust code for how results are retrieved](#getting-the-content-of-entities-and-the-results) --1. If you use Custom model training/testing APIs: -- * [Apply modifications to custom model training](#customizing-models) -- * [Change how base and custom models are retrieved](#retrieving-base-and-custom-models) -- * [Rename the path segment accuracy tests to evaluations in your client code](#accuracy-tests) --1. If you use endpoints APIs: -- * [Change how endpoint logs are retrieved](#retrieving-endpoint-logs) --1. Other minor changes: -- * [Pass all custom properties as customProperties instead of properties in your POST requests](#using-custom-properties) -- * [Read the location from response header Location instead of Operation-Location](#response-headers) --## Breaking changes --### Host name changes --Endpoint host names changed from `{region}.cris.ai` to `{region}.api.cognitive.microsoft.com`. Paths to the new endpoints no longer contain `api/` because it's part of the hostname. The [Speech to text REST API v3.0](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0) reference documentation lists valid regions and paths. ->[!IMPORTANT] ->Change the hostname from `{region}.cris.ai` to `{region}.api.cognitive.microsoft.com` where region is the region of your speech subscription. Also remove `api/`from any path in your client code. --### Identity of an entity --The property `id` is now `self`. In v2, an API user had to know how our paths on the API are being created. This was non-extensible and required unnecessary work from the user. The property `id` (uuid) is replaced by `self` (string), which is location of the entity (URL). The value is still unique between all your entities. If `id` is stored as a string in your code, a rename is enough to support the new schema. You can now use the `self` content as the URL for the `GET`, `PATCH`, and `DELETE` REST calls for your entity. --If the entity has more functionality available through other paths, they're listed under `links`. The following example for transcription shows a separate method to `GET` the content of the transcription: ->[!IMPORTANT] ->Rename the property `id` to `self` in your client code. Change the type from `uuid` to `string` if needed. --**v2 transcription:** --```json -{ - "id": "9891c965-bb32-4880-b14b-6d44efb158f3", - "createdDateTime": "2019-01-07T11:34:12Z", - "lastActionDateTime": "2019-01-07T11:36:07Z", - "status": "Succeeded", - "locale": "en-US", - "name": "Transcription using locale en-US" -} -``` --**v3 transcription:** --```json -{ - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3", - "createdDateTime": "2019-01-07T11:34:12Z", - "lastActionDateTime": "2019-01-07T11:36:07Z", - "status": "Succeeded", - "locale": "en-US", - "displayName": "Transcription using locale en-US", - "links": { - "files": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3/files" - } -} -``` --Depending on your code's implementation, it might not be enough to rename the property. We recommend using the returned `self` and `links` values as the target urls of your REST calls, rather than generating paths in your client. By using the returned URLs, you can be sure that future changes in paths won't break your client code. --### Working with collections of entities --Previously the v2 API returned all available entities in a result. To allow a more fine grained control over the expected response size in v3, all collection results are paginated. You have control over the count of returned entities and the starting offset of the page. This behavior makes it easy to predict the runtime of the response processor. --The basic shape of the response is the same for all collections: --```json -{ - "values": [ - { - } - ], - "@nextLink": "https://{region}.api.cognitive.microsoft.com/speechtotext/v3.0/{collection}?skip=100&top=100" -} -``` --The `values` property contains a subset of the available collection entities. The count and offset can be controlled using the `skip` and `top` query parameters. When `@nextLink` isn't `null`, there's more data available and the next batch of data can be retrieved by doing a GET on `$.@nextLink`. --This change requires calling the `GET` for the collection in a loop until all elements are returned. -->[!IMPORTANT] ->When the response of a GET to `speechtotext/v3.1/{collection}` contains a value in `$.@nextLink`, continue issuing `GETs` on `$.@nextLink` until `$.@nextLink` is not set to retrieve all elements of that collection. --### Creating transcriptions --A detailed description on how to create batches of transcriptions can be found in [Batch transcription How-to](./batch-transcription.md). --The v3 transcription API lets you set specific transcription options explicitly. All (optional) configuration properties can now be set in the `properties` property. -Version v3 also supports multiple input files, so it requires a list of URLs rather than a single URL as v2 did. The v2 property name `recordingsUrl` is now `contentUrls` in v3. The functionality of analyzing sentiment in transcriptions is removed in v3. See [Text Analysis](https://azure.microsoft.com/services/cognitive-services/text-analytics/) for sentiment analysis options. --The new property `timeToLive` under `properties` can help prune the existing completed entities. The `timeToLive` specifies a duration after which a completed entity is deleted automatically. Set it to a high value (for example `PT12H`) when the entities are continuously tracked, consumed, and deleted and therefore usually processed long before 12 hours have passed. --**v2 transcription POST request body:** --```json -{ - "locale": "en-US", - "name": "Transcription using locale en-US", - "recordingsUrl": "https://contoso.com/mystoragelocation", - "properties": { - "AddDiarization": "False", - "AddWordLevelTimestamps": "False", - "PunctuationMode": "DictatedAndAutomatic", - "ProfanityFilterMode": "Masked" - } -} -``` --**v3 transcription POST request body:** --```json -{ - "locale": "en-US", - "displayName": "Transcription using locale en-US", - "contentUrls": [ - "https://contoso.com/mystoragelocation", - "https://contoso.com/myotherstoragelocation" - ], - "properties": { - "diarizationEnabled": false, - "wordLevelTimestampsEnabled": false, - "punctuationMode": "DictatedAndAutomatic", - "profanityFilterMode": "Masked" - } -} -``` ->[!IMPORTANT] ->Rename the property `recordingsUrl` to `contentUrls` and pass an array of urls instead of a single url. Pass settings for `diarizationEnabled` or `wordLevelTimestampsEnabled` as `bool` instead of `string`. --### Format of v3 transcription results --The schema of transcription results has changed slightly to align with transcriptions created by real-time endpoints. Find an in-depth description of the new format in the [Batch transcription How-to](./batch-transcription.md). The schema of the result is published in our [GitHub sample repository](https://aka.ms/csspeech/samples) under `samples/batch/transcriptionresult_v3.schema.json`. --Property names are now camel-cased and the values for `channel` and `speaker` now use integer types. Formats for durations now use the structure described in ISO 8601, which matches duration formatting used in other Azure APIs. --Sample of a v3 transcription result. The differences are described in the comments. --```json -{ - "source": "...", // (new in v3) was AudioFileName / AudioFileUrl - "timestamp": "2020-06-16T09:30:21Z", // (new in v3) - "durationInTicks": 41200000, // (new in v3) was AudioLengthInSeconds - "duration": "PT4.12S", // (new in v3) - "combinedRecognizedPhrases": [ // (new in v3) was CombinedResults - { - "channel": 0, // (new in v3) was ChannelNumber - "lexical": "hello world", - "itn": "hello world", - "maskedITN": "hello world", - "display": "Hello world." - } - ], - "recognizedPhrases": [ // (new in v3) was SegmentResults - { - "recognitionStatus": "Success", // - "channel": 0, // (new in v3) was ChannelNumber - "offset": "PT0.07S", // (new in v3) new format, was OffsetInSeconds - "duration": "PT1.59S", // (new in v3) new format, was DurationInSeconds - "offsetInTicks": 700000.0, // (new in v3) was Offset - "durationInTicks": 15900000.0, // (new in v3) was Duration -- // possible transcriptions of the current phrase with confidences - "nBest": [ - { - "confidence": 0.898652852,phrase - "speaker": 1, - "lexical": "hello world", - "itn": "hello world", - "maskedITN": "hello world", - "display": "Hello world.", -- "words": [ - { - "word": "hello", - "offset": "PT0.09S", - "duration": "PT0.48S", - "offsetInTicks": 900000.0, - "durationInTicks": 4800000.0, - "confidence": 0.987572 - }, - { - "word": "world", - "offset": "PT0.59S", - "duration": "PT0.16S", - "offsetInTicks": 5900000.0, - "durationInTicks": 1600000.0, - "confidence": 0.906032 - } - ] - } - ] - } - ] -} -``` ->[!IMPORTANT] ->Deserialize the transcription result into the new type as shown previously. Instead of a single file per audio channel, distinguish channels by checking the property value of `channel` for each element in `recognizedPhrases`. There is now a single result file for each input file. ---### Getting the content of entities and the results --In v2, the links to the input or result files are inline with the rest of the entity metadata. As an improvement in v3, there's a clear separation between entity metadata (which is returned by a GET on `$.self`) and the details and credentials to access the result files. This separation helps protect customer data and allows fine control over the duration of validity of the credentials. --In v3, `links` include a sub-property called `files` in case the entity exposes data (datasets, transcriptions, endpoints, or evaluations). A GET on `$.links.files` returns a list of files and a SAS URL -to access the content of each file. To control the validity duration of the SAS URLs, the query parameter `sasValidityInSeconds` can be used to specify the lifetime. --**v2 transcription:** --```json -{ - "id": "9891c965-bb32-4880-b14b-6d44efb158f3", - "status": "Succeeded", - "reportFileUrl": "https://contoso.com/report.txt?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=rl&sv=2017-04-17&sr=b&sig=6c044930-3926-4be4-be76-f728327c53b5", - "resultsUrls": { - "channel_0": "https://contoso.com/audiofile1.wav?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=rl&sv=2017-04-17&sr=b&sig=6c044930-3926-4be4-be76-f72832e6600c", - "channel_1": "https://contoso.com/audiofile2.wav?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=rl&sv=2017-04-17&sr=b&sig=3e0163f1-0029-4d4a-988d-3fba7d7c53b5" - } -} -``` --**v3 transcription:** --```json -{ - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3", - "links": { - "files": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3/files" - } -} -``` --**A GET on `$.links.files` would result in:** --```json -{ - "values": [ - { - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3/files/f23e54f5-ed74-4c31-9730-2f1a3ef83ce8", - "name": "Name", - "kind": "Transcription", - "properties": { - "size": 200 - }, - "createdDateTime": "2020-01-13T08:00:00Z", - "links": { - "contentUrl": "https://customspeech-usw.blob.core.windows.net/artifacts/mywavefile1.wav.json?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=rl&sv=2017-04-17&sr=b&sig=e05d8d56-9675-448b-820c-4318ae64c8d5" - } - }, - { - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3/files/28bc946b-c251-4a86-84f6-ea0f0a2373ef", - "name": "Name", - "kind": "TranscriptionReport", - "properties": { - "size": 200 - }, - "createdDateTime": "2020-01-13T08:00:00Z", - "links": { - "contentUrl": "https://customspeech-usw.blob.core.windows.net/artifacts/report.json?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=rl&sv=2017-04-17&sr=b&sig=e05d8d56-9675-448b-820c-4318ae64c8d5" - } - } - ], - "@nextLink": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3/files?skip=2&top=2" -} -``` --The `kind` property indicates the format of content of the file. For transcriptions, the files of kind `TranscriptionReport` are the summary of the job and files of the kind `Transcription` are the result of the job itself. -->[!IMPORTANT] ->To get the results of operations, use a `GET` on `/speechtotext/v3.0/{collection}/{id}/files`, they are no longer contained in the responses of `GET` on `/speechtotext/v3.0/{collection}/{id}` or `/speechtotext/v3.0/{collection}`. --### Customizing models --Before v3, there was a distinction between an _acoustic model_ and a _language model_ when a model was being trained. This distinction resulted in the need to specify multiple models when creating endpoints or transcriptions. To simplify this process for a caller, we removed the differences and made everything depend on the content of the datasets that are being used for model training. With this change, the model creation now supports mixed datasets (language data and acoustic data). Endpoints and transcriptions now require only one model. --With this change, the need for a `kind` in the `POST` operation is removed and the `datasets[]` array can now contain multiple datasets of the same or mixed kinds. --To improve the results of a trained model, the acoustic data is automatically used internally during language training. In general, models created through the v3 API deliver more accurate results than models created with the v2 API. -->[!IMPORTANT] ->To customize both the acoustic and language model part, pass all of the required language and acoustic datasets in `datasets[]` of the POST to `/speechtotext/v3.0/models`. This will create a single model with both parts customized. --### Retrieving base and custom models --To simplify getting the available models, v3 has separated the collections of "base models" from the customer owned "customized models". The two routes are now -`GET /speechtotext/v3.0/models/base` and `GET /speechtotext/v3.0/models/`. --In v2, all models were returned together in a single response. -->[!IMPORTANT] ->To get a list of provided base models for customization, use `GET` on `/speechtotext/v3.0/models/base`. You can find your own customized models with a `GET` on `/speechtotext/v3.0/models`. --### Name of an entity --The `name` property is now `displayName`. This is consistent with other Azure APIs to not indicate identity properties. The value of this property must not be unique and can be changed after entity creation with a `PATCH` operation. --**v2 transcription:** --```json -{ - "name": "Transcription using locale en-US" -} -``` --**v3 transcription:** --```json -{ - "displayName": "Transcription using locale en-US" -} -``` -->[!IMPORTANT] ->Rename the property `name` to `displayName` in your client code. --### Accessing referenced entities --In v2, referenced entities were always inlined, for example the used models of an endpoint. The nesting of entities resulted in large responses and consumers rarely consumed the nested content. To shrink the response size and improve performance, the referenced entities are no longer inlined in the response. Instead, a reference to the other entity appears, and can directly be used for a subsequent `GET` (it's a URL as well), following the same pattern as the `self` link. --**v2 transcription:** --```json -{ - "id": "9891c965-bb32-4880-b14b-6d44efb158f3", - "models": [ - { - "id": "827712a5-f942-4997-91c3-7c6cde35600b", - "modelKind": "Language", - "lastActionDateTime": "2019-01-07T11:36:07Z", - "status": "Running", - "createdDateTime": "2019-01-07T11:34:12Z", - "locale": "en-US", - "name": "Acoustic model", - "description": "Example for an acoustic model", - "datasets": [ - { - "id": "702d913a-8ba6-4f66-ad5c-897400b081fb", - "dataImportKind": "Language", - "lastActionDateTime": "2019-01-07T11:36:07Z", - "status": "Succeeded", - "createdDateTime": "2019-01-07T11:34:12Z", - "locale": "en-US", - "name": "Language dataset", - } - ] - }, - ] -} -``` --**v3 transcription:** --```json -{ - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/9891c965-bb32-4880-b14b-6d44efb158f3", - "model": { - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/models/021a72d0-54c4-43d3-8254-27336ead9037" - } -} -``` --If you need to consume the details of a referenced model as shown in the above example, just issue a GET on `$.model.self`. -->[!IMPORTANT] ->To retrieve the metadata of referenced entities, issue a GET on `$.{referencedEntity}.self`, for example to retrieve the model of a transcription do a `GET` on `$.model.self`. ---### Retrieving endpoint logs --Version v2 of the service supported logging endpoint results. To retrieve the results of an endpoint with v2, you would create a "data export", which represented a snapshot of the results defined by a time range. The process of exporting batches of data was inflexible. The v3 API gives access to each individual file and allows iteration through them. --**A successfully running v3 endpoint:** --```json -{ - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/endpoints/afa0669c-a01e-4693-ae3a-93baf40f26d6", - "links": { - "logs": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/endpoints/afa0669c-a01e-4693-ae3a-93baf40f26d6/files/logs" - } -} -``` --**Response of GET `$.links.logs`:** --```json -{ - "values": [ - { - "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/endpoints/6d72ad7e-f286-4a6f-b81b-a0532ca6bcaa/files/logs/2019-09-20_080000_3b5f4628-e225-439d-bd27-8804f9eed13f.wav", - "name": "2019-09-20_080000_3b5f4628-e225-439d-bd27-8804f9eed13f.wav", - "kind": "Audio", - "properties": { - "size": 12345 - }, - "createdDateTime": "2020-01-13T08:00:00Z", - "links": { - "contentUrl": "https://customspeech-usw.blob.core.windows.net/artifacts/2019-09-20_080000_3b5f4628-e225-439d-bd27-8804f9eed13f.wav?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=rl&sv=2017-04-17&sr=b&sig=e05d8d56-9675-448b-820c-4318ae64c8d5" - } - } - ], - "@nextLink": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/endpoints/afa0669c-a01e-4693-ae3a-93baf40f26d6/files/logs?top=2&SkipToken=2!188!MDAwMDk1ITZhMjhiMDllLTg0MDYtNDViMi1hMGRkLWFlNzRlOGRhZWJkNi8yMDIwLTA0LTAxLzEyNDY0M182MzI5NGRkMi1mZGYzLTRhZmEtOTA0NC1mODU5ZTcxOWJiYzYud2F2ITAwMDAyOCE5OTk5LTEyLTMxVDIzOjU5OjU5Ljk5OTk5OTlaIQ--" -} -``` --Pagination for endpoint logs works similar to all other collections, except that no offset can be specified. Due to the large amount of available data, pagination is determined by the server. --In v3, each endpoint log can be deleted individually by issuing a `DELETE` operation on the `self` of a file, or by using `DELETE` on `$.links.logs`. To specify an end date, the query parameter `endDate` can be added to the request. --> [!IMPORTANT] -> Instead of creating log exports on `/api/speechtotext/v2.0/endpoints/{id}/data` use `/v3.0/endpoints/{id}/files/logs/` to access log files individually. --### Using custom properties --To separate custom properties from the optional configuration properties, all explicitly named properties are now located in the `properties` property and all properties defined by the callers are now located in the `customProperties` property. --**v2 transcription entity:** --```json -{ - "properties": { - "customerDefinedKey": "value", - "diarizationEnabled": "False", - "wordLevelTimestampsEnabled": "False" - } -} -``` --**v3 transcription entity:** --```json -{ - "properties": { - "diarizationEnabled": false, - "wordLevelTimestampsEnabled": false - }, - "customProperties": { - "customerDefinedKey": "value" - } -} -``` --This change also lets you use correct types on all explicitly named properties under `properties` (for example boolean instead of string). -->[!IMPORTANT] ->Pass all custom properties as `customProperties` instead of `properties` in your `POST` requests. --### Response headers --v3 no longer returns the `Operation-Location` header in addition to the `Location` header on `POST` requests. The value of both headers in v2 was the same. Now only `Location` is returned. --Because the new API version is now managed by Azure API management (APIM), the throttling related headers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` aren't contained in the response headers. -->[!IMPORTANT] ->Read the location from response header `Location` instead of `Operation-Location`. In case of a 429 response code, read the `Retry-After` header value instead of `X-RateLimit-Limit`, `X-RateLimit-Remaining`, or `X-RateLimit-Reset`. ---### Accuracy tests --Accuracy tests have been renamed to evaluations because the new name describes better what they represent. The new paths are: `https://{region}.api.cognitive.microsoft.com/speechtotext/v3.0/evaluations`. -->[!IMPORTANT] ->Rename the path segment `accuracytests` to `evaluations` in your client code. ---## Next steps --* [Speech to text REST API](rest-speech-to-text.md) -* [Speech to text REST API v3.0 reference](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0) |
ai-services | Migrate V3 0 To V3 1 | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/migrate-v3-0-to-v3-1.md | For more information, see [Operation IDs](#operation-ids) later in this guide. > [!NOTE] > Don't use Speech to text REST API v3.0 to retrieve a transcription created via Speech to text REST API v3.1. You'll see an error message such as the following: "The API version cannot be used to access this transcription. Please use API version v3.1 or higher." -In the [Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create) operation the following three properties are added: +In the [Transcriptions_Create](/rest/api/speechtotext/transcriptions/create) operation the following three properties are added: - The `displayFormWordLevelTimestampsEnabled` property can be used to enable the reporting of word-level timestamps on the display form of the transcription results. The results are returned in the `displayWords` property of the transcription file. - The `diarization` property can be used to specify hints for the minimum and maximum number of speaker labels to generate when performing optional diarization (speaker separation). With this feature, the service is now able to generate speaker labels for more than two speakers. To use this property, you must also set the `diarizationEnabled` property to `true`. With the v3.1 API, we have increased the number of speakers that can be identified through diarization from the two speakers supported by the v3.0 API. It's recommended to keep the number of speakers under 30 for better performance. - The `languageIdentification` property can be used specify settings for language identification on the input prior to transcription. Up to 10 candidate locales are supported for language identification. The returned transcription includes a new `locale` property for the recognized language or the locale that you provided. -The `filter` property is added to the [Transcriptions_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_List), [Transcriptions_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListFiles), and [Projects_ListTranscriptions](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListTranscriptions) operations. The `filter` expression can be used to select a subset of the available resources. You can filter by `displayName`, `description`, `createdDateTime`, `lastActionDateTime`, `status`, and `locale`. For example: `filter=createdDateTime gt 2022-02-01T11:00:00Z` +The `filter` property is added to the [Transcriptions_List](/rest/api/speechtotext/transcriptions/list), [Transcriptions_ListFiles](/rest/api/speechtotext/transcriptions/list-files), and [Projects_ListTranscriptions](/rest/api/speechtotext/projects/list-transcriptions) operations. The `filter` expression can be used to select a subset of the available resources. You can filter by `displayName`, `description`, `createdDateTime`, `lastActionDateTime`, `status`, and `locale`. For example: `filter=createdDateTime gt 2022-02-01T11:00:00Z` If you use webhook to receive notifications about transcription status, note that the webhooks created via V3.0 API can't receive notifications for V3.1 transcription requests. You need to create a new webhook endpoint via V3.1 API in order to receive notifications for V3.1 transcription requests. If you use webhook to receive notifications about transcription status, note tha ### Datasets The following operations are added for uploading and managing multiple data blocks for a dataset:+ - [Datasets_UploadBlock](/rest/api/speechtotext/datasets/upload-block) - Upload a block of data for the dataset. The maximum size of the block is 8MiB. + - [Datasets_GetBlocks](/rest/api/speechtotext/datasets/get-blocks) - Get the list of uploaded blocks for this dataset. + - [Datasets_CommitBlocks](/rest/api/speechtotext/datasets/commit-blocks) - Commit blocklist to complete the upload of the dataset. -To support model adaptation with [structured text in markdown](how-to-custom-speech-test-and-train.md#structured-text-data-for-training) data, the [Datasets_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Create) operation now supports the **LanguageMarkdown** data kind. For more information, see [upload datasets](how-to-custom-speech-upload-data.md#upload-datasets). +To support model adaptation with [structured text in markdown](how-to-custom-speech-test-and-train.md#structured-text-data-for-training) data, the [Datasets_Create](/rest/api/speechtotext/datasets/create) operation now supports the **LanguageMarkdown** data kind. For more information, see [upload datasets](how-to-custom-speech-upload-data.md#upload-datasets). ### Models -The [Models_ListBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListBaseModels) and [Models_GetBaseModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetBaseModel) operations return information on the type of adaptation supported by each base model. +The [Models_ListBaseModels](/rest/api/speechtotext/models/list-base-models) and [Models_GetBaseModel](/rest/api/speechtotext/models/get-base-model) operations return information on the type of adaptation supported by each base model. ```json "features": { The [Models_ListBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/serv } ``` -The [Models_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Create) operation has a new `customModelWeightPercent` property where you can specify the weight used when the Custom Language Model (trained from plain or structured text data) is combined with the Base Language Model. Valid values are integers between 1 and 100. The default value is currently 30. +The [Models_Create](/rest/api/speechtotext/models/create) operation has a new `customModelWeightPercent` property where you can specify the weight used when the Custom Language Model (trained from plain or structured text data) is combined with the Base Language Model. Valid values are integers between 1 and 100. The default value is currently 30. The `filter` property is added to the following operations: -- [Datasets_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_List)-- [Datasets_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListFiles)-- [Endpoints_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_List)-- [Evaluations_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_List)-- [Evaluations_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_ListFiles)-- [Models_ListBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListBaseModels)-- [Models_ListCustomModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListCustomModels)-- [Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List)-- [Projects_ListDatasets](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListDatasets)-- [Projects_ListEndpoints](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListEndpoints)-- [Projects_ListEvaluations](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListEvaluations)-- [Projects_ListModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListModels)+- [Datasets_List](/rest/api/speechtotext/datasets/list) +- [Datasets_ListFiles](/rest/api/speechtotext/datasets/list-files) +- [Endpoints_List](/rest/api/speechtotext/endpoints/list) +- [Evaluations_List](/rest/api/speechtotext/evaluations/list) +- [Evaluations_ListFiles](/rest/api/speechtotext/evaluations/list-files) +- [Models_ListBaseModels](/rest/api/speechtotext/models/list-base-models) +- [Models_ListCustomModels](/rest/api/speechtotext/models/list-custom-models) +- [Projects_List](/rest/api/speechtotext/projects/list) +- [Projects_ListDatasets](/rest/api/speechtotext/projects/list-datasets) +- [Projects_ListEndpoints](/rest/api/speechtotext/projects/list-endpoints) +- [Projects_ListEvaluations](/rest/api/speechtotext/projects/list-evaluations) +- [Projects_ListModels](/rest/api/speechtotext/projects/list-models) The `filter` expression can be used to select a subset of the available resources. You can filter by `displayName`, `description`, `createdDateTime`, `lastActionDateTime`, `status`, `locale`, and `kind`. For example: `filter=locale eq 'en-US'` -Added the [Models_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListFiles) operation to get the files of the model identified by the given ID. +Added the [Models_ListFiles](/rest/api/speechtotext/models/list-files) operation to get the files of the model identified by the given ID. -Added the [Models_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetFile) operation to get one specific file (identified with fileId) from a model (identified with ID). This lets you retrieve a **ModelReport** file that provides information on the data processed during training. +Added the [Models_GetFile](/rest/api/speechtotext/models/get-file) operation to get one specific file (identified with fileId) from a model (identified with ID). This lets you retrieve a **ModelReport** file that provides information on the data processed during training. ## Operation IDs You must update the base path in your code from `/speechtotext/v3.0` to `/speechtotext/v3.1`. For example, to get base models in the `eastus` region, use `https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/base` instead of `https://eastus.api.cognitive.microsoft.com/speechtotext/v3.0/models/base`. -The name of each `operationId` in version 3.1 is prefixed with the object name. For example, the `operationId` for "Create Model" changed from [CreateModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateModel) in version 3.0 to [Models_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Create) in version 3.1. --|Path|Method|Version 3.1 Operation ID|Version 3.0 Operation ID| -||||| -|`/datasets`|GET|[Datasets_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_List)|[GetDatasets](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasets)| -|`/datasets`|POST|[Datasets_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Create)|[CreateDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateDataset)| -|`/datasets/{id}`|DELETE|[Datasets_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Delete)|[DeleteDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteDataset)| -|`/datasets/{id}`|GET|[Datasets_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Get)|[GetDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDataset)| -|`/datasets/{id}`|PATCH|[Datasets_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Update)|[UpdateDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateDataset)| -|`/datasets/{id}/blocks:commit`|POST|[Datasets_CommitBlocks](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_CommitBlocks)|Not applicable| -|`/datasets/{id}/blocks`|GET|[Datasets_GetBlocks](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_GetBlocks)|Not applicable| -|`/datasets/{id}/blocks`|PUT|[Datasets_UploadBlock](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_UploadBlock)|Not applicable| -|`/datasets/{id}/files`|GET|[Datasets_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListFiles)|[GetDatasetFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasetFiles)| -|`/datasets/{id}/files/{fileId}`|GET|[Datasets_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_GetFile)|[GetDatasetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasetFile)| -|`/datasets/locales`|GET|[Datasets_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListSupportedLocales)|[GetSupportedLocalesForDatasets](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForDatasets)| -|`/datasets/upload`|POST|[Datasets_Upload](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Upload)|[UploadDatasetFromForm](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UploadDatasetFromForm)| -|`/endpoints`|GET|[Endpoints_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_List)|[GetEndpoints](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpoints)| -|`/endpoints`|POST|[Endpoints_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Create)|[CreateEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateEndpoint)| -|`/endpoints/{id}`|DELETE|[Endpoints_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Delete)|[DeleteEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEndpoint)| -|`/endpoints/{id}`|GET|[Endpoints_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Get)|[GetEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpoint)| -|`/endpoints/{id}`|PATCH|[Endpoints_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Update)|[UpdateEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateEndpoint)| -|`/endpoints/{id}/files/logs`|DELETE|[Endpoints_DeleteLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteLogs)|[DeleteEndpointLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEndpointLogs)| -|`/endpoints/{id}/files/logs`|GET|[Endpoints_ListLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListLogs)|[GetEndpointLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpointLogs)| -|`/endpoints/{id}/files/logs/{logId}`|DELETE|[Endpoints_DeleteLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteLog)|[DeleteEndpointLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEndpointLog)| -|`/endpoints/{id}/files/logs/{logId}`|GET|[Endpoints_GetLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_GetLog)|[GetEndpointLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpointLog)| -|`/endpoints/base/{locale}/files/logs`|DELETE|[Endpoints_DeleteBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteBaseModelLogs)|[DeleteBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteBaseModelLogs)| -|`/endpoints/base/{locale}/files/logs`|GET|[Endpoints_ListBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListBaseModelLogs)|[GetBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModelLogs)| -|`/endpoints/base/{locale}/files/logs/{logId}`|DELETE|[Endpoints_DeleteBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteBaseModelLog)|[DeleteBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteBaseModelLog)| -|`/endpoints/base/{locale}/files/logs/{logId}`|GET|[Endpoints_GetBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_GetBaseModelLog)|[GetBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModelLog)| -|`/endpoints/locales`|GET|[Endpoints_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListSupportedLocales)|[GetSupportedLocalesForEndpoints](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForEndpoints)| -|`/evaluations`|GET|[Evaluations_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_List)|[GetEvaluations](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluations)| -|`/evaluations`|POST|[Evaluations_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Create)|[CreateEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateEvaluation)| -|`/evaluations/{id}`|DELETE|[Evaluations_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Delete)|[DeleteEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEvaluation)| -|`/evaluations/{id}`|GET|[Evaluations_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Get)|[GetEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluation)| -|`/evaluations/{id}`|PATCH|[Evaluations_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Update)|[UpdateEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateEvaluation)| -|`/evaluations/{id}/files`|GET|[Evaluations_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_ListFiles)|[GetEvaluationFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluationFiles)| -|`/evaluations/{id}/files/{fileId}`|GET|[Evaluations_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_GetFile)|[GetEvaluationFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluationFile)| -|`/evaluations/locales`|GET|[Evaluations_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_ListSupportedLocales)|[GetSupportedLocalesForEvaluations](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForEvaluations)| -|`/healthstatus`|GET|[HealthStatus_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/HealthStatus_Get)|[GetHealthStatus](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetHealthStatus)| -|`/models`|GET|[Models_ListCustomModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListCustomModels)|[GetModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModels)| -|`/models`|POST|[Models_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Create)|[CreateModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateModel)| -|`/models/{id}:copyto`<sup>1</sup>|POST|[Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_CopyTo)|[CopyModelToSubscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CopyModelToSubscription)| -|`/models/{id}`|DELETE|[Models_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Delete)|[DeleteModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteModel)| -|`/models/{id}`|GET|[Models_GetCustomModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetCustomModel)|[GetModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModel)| -|`/models/{id}`|PATCH|[Models_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Update)|[UpdateModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateModel)| -|`/models/{id}/files`|GET|[Models_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListFiles)|Not applicable| -|`/models/{id}/files/{fileId}`|GET|[Models_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetFile)|Not applicable| -|`/models/{id}/manifest`|GET|[Models_GetCustomModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetCustomModelManifest)|[GetModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModelManifest)| -|`/models/base`|GET|[Models_ListBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListBaseModels)|[GetBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModels)| -|`/models/base/{id}`|GET|[Models_GetBaseModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetBaseModel)|[GetBaseModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModel)| -|`/models/base/{id}/manifest`|GET|[Models_GetBaseModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetBaseModelManifest)|[GetBaseModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModelManifest)| -|`/models/locales`|GET|[Models_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListSupportedLocales)|[GetSupportedLocalesForModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForModels)| -|`/projects`|GET|[Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List)|[GetProjects](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetProjects)| -|`/projects`|POST|[Projects_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Create)|[CreateProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateProject)| -|`/projects/{id}`|DELETE|[Projects_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Delete)|[DeleteProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteProject)| -|`/projects/{id}`|GET|[Projects_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Get)|[GetProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetProject)| -|`/projects/{id}`|PATCH|[Projects_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Update)|[UpdateProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateProject)| -|`/projects/{id}/datasets`|GET|[Projects_ListDatasets](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListDatasets)|[GetDatasetsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasetsForProject)| -|`/projects/{id}/endpoints`|GET|[Projects_ListEndpoints](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListEndpoints)|[GetEndpointsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpointsForProject)| -|`/projects/{id}/evaluations`|GET|[Projects_ListEvaluations](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListEvaluations)|[GetEvaluationsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluationsForProject)| -|`/projects/{id}/models`|GET|[Projects_ListModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListModels)|[GetModelsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModelsForProject)| -|`/projects/{id}/transcriptions`|GET|[Projects_ListTranscriptions](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListTranscriptions)|[GetTranscriptionsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionsForProject)| -|`/projects/locales`|GET|[Projects_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListSupportedLocales)|[GetSupportedProjectLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedProjectLocales)| -|`/transcriptions`|GET|[Transcriptions_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_List)|[GetTranscriptions](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptions)| -|`/transcriptions`|POST|[Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create)|[CreateTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateTranscription)| -|`/transcriptions/{id}`|DELETE|[Transcriptions_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Delete)|[DeleteTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteTranscription)| -|`/transcriptions/{id}`|GET|[Transcriptions_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Get)|[GetTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscription)| -|`/transcriptions/{id}`|PATCH|[Transcriptions_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Update)|[UpdateTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateTranscription)| -|`/transcriptions/{id}/files`|GET|[Transcriptions_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListFiles)|[GetTranscriptionFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionFiles)| -|`/transcriptions/{id}/files/{fileId}`|GET|[Transcriptions_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_GetFile)|[GetTranscriptionFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionFile)| -|`/transcriptions/locales`|GET|[Transcriptions_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListSupportedLocales)|[GetSupportedLocalesForTranscriptions](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForTranscriptions)| -|`/webhooks`|GET|[WebHooks_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_List)|[GetHooks](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetHooks)| -|`/webhooks`|POST|[WebHooks_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Create)|[CreateHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateHook)| -|`/webhooks/{id}:ping`<sup>2</sup>|POST|[WebHooks_Ping](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Ping)|[PingHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/PingHook)| -|`/webhooks/{id}:test`<sup>3</sup>|POST|[WebHooks_Test](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Test)|[TestHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/TestHook)| -|`/webhooks/{id}`|DELETE|[WebHooks_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Delete)|[DeleteHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteHook)| -|`/webhooks/{id}`|GET|[WebHooks_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Get)|[GetHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetHook)| -|`/webhooks/{id}`|PATCH|[WebHooks_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Update)|[UpdateHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateHook)| --<sup>1</sup> The `/models/{id}/copyto` operation (includes '/') in version 3.0 is replaced by the `/models/{id}:copyto` operation (includes ':') in version 3.1. --<sup>2</sup> The `/webhooks/{id}/ping` operation (includes '/') in version 3.0 is replaced by the `/webhooks/{id}:ping` operation (includes ':') in version 3.1. --<sup>3</sup> The `/webhooks/{id}/test` operation (includes '/') in version 3.0 is replaced by the `/webhooks/{id}:test` operation (includes ':') in version 3.1. +The name of each `operationId` in version 3.1 is prefixed with the object name. For example, the `operationId` for "Create Model" changed from [CreateModel](/rest/api/speechtotext/create-model/create-model?view=rest-speechtotext-v3.0&preserve-view=true) in version 3.0 to [Models_Create](/rest/api/speechtotext/models/create?view=rest-speechtotext-v3.1&preserve-view=true) in version 3.1. ++The `/models/{id}/copyto` operation (includes '/') in version 3.0 is replaced by the `/models/{id}:copyto` operation (includes ':') in version 3.1. ++The `/webhooks/{id}/ping` operation (includes '/') in version 3.0 is replaced by the `/webhooks/{id}:ping` operation (includes ':') in version 3.1. ++The `/webhooks/{id}/test` operation (includes '/') in version 3.0 is replaced by the `/webhooks/{id}:test` operation (includes ':') in version 3.1. ## Next steps * [Speech to text REST API](rest-speech-to-text.md)-* [Speech to text REST API v3.1 reference](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1) -* [Speech to text REST API v3.0 reference](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0) +* [Speech to text REST API v3.1 reference](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.1&preserve-view=true) +* [Speech to text REST API v3.0 reference](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.0&preserve-view=true) |
ai-services | Migrate V3 1 To V3 2 | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/migrate-v3-1-to-v3-2.md | Azure AI Speech now supports OpenAI's Whisper model via Speech to text REST API ### Custom display text formatting -To support model adaptation with [custom display text formatting](how-to-custom-speech-test-and-train.md#custom-display-text-formatting-data-for-training) data, the [Datasets_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Datasets_Create) operation supports the **OutputFormatting** data kind. For more information, see [upload datasets](how-to-custom-speech-upload-data.md#upload-datasets). +To support model adaptation with [custom display text formatting](how-to-custom-speech-test-and-train.md#custom-display-text-formatting-data-for-training) data, the [Datasets_Create](/rest/api/speechtotext/datasets/create) operation supports the **OutputFormatting** data kind. For more information, see [upload datasets](how-to-custom-speech-upload-data.md#upload-datasets). Added a definition for `OutputFormatType` with `Lexical` and `Display` enum values. Added token count and token error properties to the `EvaluationProperties` prope ### Model copy The following changes are for the scenario where you copy a model.-- Added the new [Models_Copy](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Models_Copy) operation. Here's the schema in the new copy operation: `"$ref": "#/definitions/ModelCopyAuthorization"` -- Deprecated the [Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Models_CopyTo) operation. Here's the schema in the deprecated copy operation: `"$ref": "#/definitions/ModelCopy"`-- Added the new [Models_AuthorizeCopy](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Models_AuthorizeCopy) operation that returns `"$ref": "#/definitions/ModelCopyAuthorization"`. This returned entity can be used in the new [Models_Copy](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Models_Copy) operation.+- Added the new [Models_Copy](/rest/api/speechtotext/models/copy) operation. Here's the schema in the new copy operation: `"$ref": "#/definitions/ModelCopyAuthorization"` +- Deprecated the [Models_CopyTo](/rest/api/speechtotext/models/copy-to) operation. Here's the schema in the deprecated copy operation: `"$ref": "#/definitions/ModelCopy"` +- Added the new [Models_AuthorizeCopy](/rest/api/speechtotext/models/authorize-copy) operation that returns `"$ref": "#/definitions/ModelCopyAuthorization"`. This returned entity can be used in the new [Models_Copy](/rest/api/speechtotext/models/copy) operation. Added a new entity definition for `ModelCopyAuthorization`: Added a new entity definition for `ModelCopyAuthorizationDefinition`: ### CustomModelLinks copy properties Added a new `copy` property.-- `copyTo` URI: The location of the obsolete model copy action. See the [Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Models_CopyTo) operation for more details.-- `copy` URI: The location of the model copy action. See the [Models_Copy](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2/operations/Models_Copy) operation for more details.+- `copyTo` URI: The location of the obsolete model copy action. See the [Models_CopyTo](/rest/api/speechtotext/models/copy-to) operation for more details. +- `copy` URI: The location of the model copy action. See the [Models_Copy](/rest/api/speechtotext/models/copy) operation for more details. ```json "CustomModelLinks": { You must update the base path in your code from `/speechtotext/v3.1` to `/speech ## Next steps * [Speech to text REST API](rest-speech-to-text.md)-* [Speech to text REST API v3.2 (preview)](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2) -* [Speech to text REST API v3.1 reference](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1) -* [Speech to text REST API v3.0 reference](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0) --+* [Speech to text REST API v3.2 (preview)](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.2-preview.2&preserve-view=true) +* [Speech to text REST API v3.1 reference](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.1&preserve-view=true) +* [Speech to text REST API v3.0 reference](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.0&preserve-view=true) |
ai-services | Power Automate Batch Transcription | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/power-automate-batch-transcription.md | Last updated 1/21/2024 # Power automate batch transcription -This article describes how to use [Power Automate](/power-automate/getting-started) and the [Azure AI services for Batch Speech to text connector](/connectors/cognitiveservicesspe/) to transcribe audio files from an Azure Storage container. The connector uses the [Batch Transcription REST API](batch-transcription.md), but you don't need to write any code to use it. If the connector doesn't meet your requirements, you can still use the [REST API](rest-speech-to-text.md#transcriptions) directly. +This article describes how to use [Power Automate](/power-automate/getting-started) and the [Azure AI services for Batch Speech to text connector](/connectors/cognitiveservicesspe/) to transcribe audio files from an Azure Storage container. The connector uses the [Batch Transcription REST API](batch-transcription.md), but you don't need to write any code to use it. If the connector doesn't meet your requirements, you can still use the [REST API](rest-speech-to-text.md#batch-transcription) directly. In addition to [Power Automate](/power-automate/getting-started), you can use the [Azure AI services for Batch Speech to text connector](/connectors/cognitiveservicesspe/) with [Power Apps](/power-apps) and [Logic Apps](../../logic-apps/index.yml). |
ai-services | Resiliency And Recovery Plan | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/resiliency-and-recovery-plan.md | You should create Speech service resources in both a main and a secondary region Custom speech service doesn't support automatic failover. We suggest the following steps to prepare for manual or automatic failover implemented in your client code. In these steps, you replicate custom models in a secondary region. With this preparation, your client code can switch to a secondary region when the primary region fails. 1. Create your custom model in one main region (Primary).-2. Run the [Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_CopyTo) operation to replicate the custom model to all prepared regions (Secondary). +2. Run the [Models_CopyTo](/rest/api/speechtotext/models/copy-to) operation to replicate the custom model to all prepared regions (Secondary). 3. Go to Speech Studio to load the copied model and create a new endpoint in the secondary region. See how to deploy a new model in [Deploy a custom speech model](./how-to-custom-speech-deploy-model.md). - If you have set a specific quota, also consider setting the same quota in the backup regions. See details in [Speech service Quotas and Limits](./speech-services-quotas-and-limits.md). 4. Configure your client to fail over on persistent errors as with the default endpoints usage. |
ai-services | Rest Speech To Text | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/rest-speech-to-text.md | Title: Speech to text REST API - Speech service description: Get reference documentation for Speech to text REST API.- Previously updated : 1/21/2024 Last updated : 4/15/2024++ - # Speech to text REST API Speech to text REST API is used for [batch transcription](batch-transcription.md > Speech to text REST API v3.0 will be retired on April 1st, 2026. For more information, see the Speech to text REST API [v3.0 to v3.1](migrate-v3-0-to-v3-1.md) and [v3.1 to v3.2](migrate-v3-1-to-v3-2.md) migration guides. > [!div class="nextstepaction"]-> [See the Speech to text REST API v3.2 (preview)](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-2-preview2) +> [See the Speech to text REST API v3.2 (preview)](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.2-preview.2&preserve-view=true) > [!div class="nextstepaction"]-> [See the Speech to text REST API v3.1 reference documentation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/) +> [See the Speech to text REST API v3.1 reference documentation](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.1&preserve-view=true) > [!div class="nextstepaction"]-> [See the Speech to text REST API v3.0 reference documentation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/) +> [See the Speech to text REST API v3.0 reference documentation](/rest/api/speechtotext/operation-groups?view=rest-speechtotext-v3.0&preserve-view=true) Use Speech to text REST API to: Speech to text REST API includes such features as: - Bring your own storage. Use your own storage accounts for logs, transcription files, and other data. - Some operations support webhook notifications. You can register your webhooks where notifications are sent. -## Datasets --Datasets are applicable for [custom speech](custom-speech-overview.md). You can use datasets to train and test the performance of different models. For example, you can compare the performance of a model trained with a specific dataset to the performance of a model trained with a different dataset. --See [Upload training and testing datasets](how-to-custom-speech-upload-data.md?pivots=rest-api) for examples of how to upload datasets. This table includes all the operations that you can perform on datasets. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/datasets`|GET|[Datasets_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_List)|[GetDatasets](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasets)| -|`/datasets`|POST|[Datasets_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Create)|[CreateDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateDataset)| -|`/datasets/{id}`|DELETE|[Datasets_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Delete)|[DeleteDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteDataset)| -|`/datasets/{id}`|GET|[Datasets_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Get)|[GetDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDataset)| -|`/datasets/{id}`|PATCH|[Datasets_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Update)|[UpdateDataset](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateDataset)| -|`/datasets/{id}/blocks:commit`|POST|[Datasets_CommitBlocks](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_CommitBlocks)|Not applicable| -|`/datasets/{id}/blocks`|GET|[Datasets_GetBlocks](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_GetBlocks)|Not applicable| -|`/datasets/{id}/blocks`|PUT|[Datasets_UploadBlock](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_UploadBlock)|Not applicable| -|`/datasets/{id}/files`|GET|[Datasets_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListFiles)|[GetDatasetFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasetFiles)| -|`/datasets/{id}/files/{fileId}`|GET|[Datasets_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_GetFile)|[GetDatasetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasetFile)| -|`/datasets/locales`|GET|[Datasets_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_ListSupportedLocales)|[GetSupportedLocalesForDatasets](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForDatasets)| -|`/datasets/upload`|POST|[Datasets_Upload](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Datasets_Upload)|[UploadDatasetFromForm](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UploadDatasetFromForm)| --## Endpoints --Endpoints are applicable for [custom speech](custom-speech-overview.md). You must deploy a custom endpoint to use a custom speech model. --See [Deploy a model](how-to-custom-speech-deploy-model.md?pivots=rest-api) for examples of how to manage deployment endpoints. This table includes all the operations that you can perform on endpoints. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/endpoints`|GET|[Endpoints_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_List)|[GetEndpoints](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpoints)| -|`/endpoints`|POST|[Endpoints_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Create)|[CreateEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateEndpoint)| -|`/endpoints/{id}`|DELETE|[Endpoints_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Delete)|[DeleteEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEndpoint)| -|`/endpoints/{id}`|GET|[Endpoints_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Get)|[GetEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpoint)| -|`/endpoints/{id}`|PATCH|[Endpoints_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_Update)|[UpdateEndpoint](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateEndpoint)| -|`/endpoints/{id}/files/logs`|DELETE|[Endpoints_DeleteLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteLogs)|[DeleteEndpointLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEndpointLogs)| -|`/endpoints/{id}/files/logs`|GET|[Endpoints_ListLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListLogs)|[GetEndpointLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpointLogs)| -|`/endpoints/{id}/files/logs/{logId}`|DELETE|[Endpoints_DeleteLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteLog)|[DeleteEndpointLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEndpointLog)| -|`/endpoints/{id}/files/logs/{logId}`|GET|[Endpoints_GetLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_GetLog)|[GetEndpointLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpointLog)| -|`/endpoints/base/{locale}/files/logs`|DELETE|[Endpoints_DeleteBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteBaseModelLogs)|[DeleteBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteBaseModelLogs)| -|`/endpoints/base/{locale}/files/logs`|GET|[Endpoints_ListBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListBaseModelLogs)|[GetBaseModelLogs](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModelLogs)| -|`/endpoints/base/{locale}/files/logs/{logId}`|DELETE|[Endpoints_DeleteBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_DeleteBaseModelLog)|[DeleteBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteBaseModelLog)| -|`/endpoints/base/{locale}/files/logs/{logId}`|GET|[Endpoints_GetBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_GetBaseModelLog)|[GetBaseModelLog](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModelLog)| -|`/endpoints/locales`|GET|[Endpoints_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Endpoints_ListSupportedLocales)|[GetSupportedLocalesForEndpoints](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForEndpoints)| --## Evaluations --Evaluations are applicable for [custom speech](custom-speech-overview.md). You can use evaluations to compare the performance of different models. For example, you can compare the performance of a model trained with a specific dataset to the performance of a model trained with a different dataset. --See [Test recognition quality](how-to-custom-speech-inspect-data.md?pivots=rest-api) and [Test accuracy](how-to-custom-speech-evaluate-data.md?pivots=rest-api) for examples of how to test and evaluate custom speech models. This table includes all the operations that you can perform on evaluations. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/evaluations`|GET|[Evaluations_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_List)|[GetEvaluations](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluations)| -|`/evaluations`|POST|[Evaluations_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Create)|[CreateEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateEvaluation)| -|`/evaluations/{id}`|DELETE|[Evaluations_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Delete)|[DeleteEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteEvaluation)| -|`/evaluations/{id}`|GET|[Evaluations_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Get)|[GetEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluation)| -|`/evaluations/{id}`|PATCH|[Evaluations_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_Update)|[UpdateEvaluation](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateEvaluation)| -|`/evaluations/{id}/files`|GET|[Evaluations_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_ListFiles)|[GetEvaluationFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluationFiles)| -|`/evaluations/{id}/files/{fileId}`|GET|[Evaluations_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_GetFile)|[GetEvaluationFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluationFile)| -|`/evaluations/locales`|GET|[Evaluations_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Evaluations_ListSupportedLocales)|[GetSupportedLocalesForEvaluations](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForEvaluations)| --## Health status --Health status provides insights about the overall health of the service and subcomponents. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/healthstatus`|GET|[HealthStatus_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/HealthStatus_Get)|[GetHealthStatus](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetHealthStatus)| --## Models --Models are applicable for [custom speech](custom-speech-overview.md) and [Batch Transcription](batch-transcription.md). You can use models to transcribe audio files. For example, you can use a model trained with a specific dataset to transcribe audio files. --See [Train a model](how-to-custom-speech-train-model.md?pivots=rest-api) and [custom speech model lifecycle](how-to-custom-speech-model-and-endpoint-lifecycle.md?pivots=rest-api) for examples of how to train and manage custom speech models. This table includes all the operations that you can perform on models. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/models`|GET|[Models_ListCustomModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListCustomModels)|[GetModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModels)| -|`/models`|POST|[Models_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Create)|[CreateModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateModel)| -|`/models/{id}:copyto`<sup>1</sup>|POST|[Models_CopyTo](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_CopyTo)|[CopyModelToSubscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CopyModelToSubscription)| -|`/models/{id}`|DELETE|[Models_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Delete)|[DeleteModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteModel)| -|`/models/{id}`|GET|[Models_GetCustomModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetCustomModel)|[GetModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModel)| -|`/models/{id}`|PATCH|[Models_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Update)|[UpdateModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateModel)| -|`/models/{id}/files`|GET|[Models_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListFiles)|Not applicable| -|`/models/{id}/files/{fileId}`|GET|[Models_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetFile)|Not applicable| -|`/models/{id}/manifest`|GET|[Models_GetCustomModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetCustomModelManifest)|[GetModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModelManifest)| -|`/models/base`|GET|[Models_ListBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListBaseModels)|[GetBaseModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModels)| -|`/models/base/{id}`|GET|[Models_GetBaseModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetBaseModel)|[GetBaseModel](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModel)| -|`/models/base/{id}/manifest`|GET|[Models_GetBaseModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_GetBaseModelManifest)|[GetBaseModelManifest](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetBaseModelManifest)| -|`/models/locales`|GET|[Models_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_ListSupportedLocales)|[GetSupportedLocalesForModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForModels)| --## Projects --Projects are applicable for [custom speech](custom-speech-overview.md). Custom speech projects contain models, training and testing datasets, and deployment endpoints. Each project is specific to a [locale](language-support.md?tabs=stt). For example, you might create a project for English in the United States. --See [Create a project](how-to-custom-speech-create-project.md?pivots=rest-api) for examples of how to create projects. This table includes all the operations that you can perform on projects. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/projects`|GET|[Projects_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_List)|[GetProjects](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetProjects)| -|`/projects`|POST|[Projects_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Create)|[CreateProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateProject)| -|`/projects/{id}`|DELETE|[Projects_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Delete)|[DeleteProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteProject)| -|`/projects/{id}`|GET|[Projects_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Get)|[GetProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetProject)| -|`/projects/{id}`|PATCH|[Projects_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_Update)|[UpdateProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateProject)| -|`/projects/{id}/datasets`|GET|[Projects_ListDatasets](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListDatasets)|[GetDatasetsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetDatasetsForProject)| -|`/projects/{id}/endpoints`|GET|[Projects_ListEndpoints](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListEndpoints)|[GetEndpointsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpointsForProject)| -|`/projects/{id}/evaluations`|GET|[Projects_ListEvaluations](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListEvaluations)|[GetEvaluationsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEvaluationsForProject)| -|`/projects/{id}/models`|GET|[Projects_ListModels](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListModels)|[GetModelsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetModelsForProject)| -|`/projects/{id}/transcriptions`|GET|[Projects_ListTranscriptions](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListTranscriptions)|[GetTranscriptionsForProject](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionsForProject)| -|`/projects/locales`|GET|[Projects_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Projects_ListSupportedLocales)|[GetSupportedProjectLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedProjectLocales)| ---## Transcriptions --Transcriptions are applicable for [Batch Transcription](batch-transcription.md). Batch transcription is used to transcribe a large amount of audio in storage. You should send multiple files per request or point to an Azure Blob Storage container with the audio files to transcribe. --See [Create a transcription](batch-transcription-create.md?pivots=rest-api) for examples of how to create a transcription from multiple audio files. This table includes all the operations that you can perform on transcriptions. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/transcriptions`|GET|[Transcriptions_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_List)|[GetTranscriptions](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptions)| -|`/transcriptions`|POST|[Transcriptions_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create)|[CreateTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateTranscription)| -|`/transcriptions/{id}`|DELETE|[Transcriptions_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Delete)|[DeleteTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteTranscription)| -|`/transcriptions/{id}`|GET|[Transcriptions_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Get)|[GetTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscription)| -|`/transcriptions/{id}`|PATCH|[Transcriptions_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Update)|[UpdateTranscription](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateTranscription)| -|`/transcriptions/{id}/files`|GET|[Transcriptions_ListFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListFiles)|[GetTranscriptionFiles](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionFiles)| -|`/transcriptions/{id}/files/{fileId}`|GET|[Transcriptions_GetFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_GetFile)|[GetTranscriptionFile](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionFile)| -|`/transcriptions/locales`|GET|[Transcriptions_ListSupportedLocales](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_ListSupportedLocales)|[GetSupportedLocalesForTranscriptions](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForTranscriptions)| ---## Web hooks --Web hooks are applicable for [custom speech](custom-speech-overview.md) and [Batch Transcription](batch-transcription.md). In particular, web hooks apply to [datasets](#datasets), [endpoints](#endpoints), [evaluations](#evaluations), [models](#models), and [transcriptions](#transcriptions). Web hooks can be used to receive notifications about creation, processing, completion, and deletion events. --This table includes all the web hook operations that are available with the Speech to text REST API. --|Path|Method|Version 3.1|Version 3.0| -||||| -|`/webhooks`|GET|[WebHooks_List](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_List)|[GetHooks](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetHooks)| -|`/webhooks`|POST|[WebHooks_Create](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Create)|[CreateHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateHook)| -|`/webhooks/{id}:ping`<sup>1</sup>|POST|[WebHooks_Ping](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Ping)|[PingHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/PingHook)| -|`/webhooks/{id}:test`<sup>2</sup>|POST|[WebHooks_Test](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Test)|[TestHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/TestHook)| -|`/webhooks/{id}`|DELETE|[WebHooks_Delete](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Delete)|[DeleteHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/DeleteHook)| -|`/webhooks/{id}`|GET|[WebHooks_Get](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Get)|[GetHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetHook)| -|`/webhooks/{id}`|PATCH|[WebHooks_Update](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/WebHooks_Update)|[UpdateHook](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/UpdateHook)| +## Batch transcription ++The following operation groups are applicable for [batch transcription](batch-transcription.md). ++| Operation group | Description | +||| +| [Models](/rest/api/speechtotext/models) | Use base models or custom models to transcribe audio files.<br/><br/>You can use models with [custom speech](custom-speech-overview.md) and [batch transcription](batch-transcription.md). For example, you can use a model trained with a specific dataset to transcribe audio files. See [Train a model](how-to-custom-speech-train-model.md?pivots=rest-api) and [custom speech model lifecycle](how-to-custom-speech-model-and-endpoint-lifecycle.md?pivots=rest-api) for examples of how to train and manage custom speech models. | +| [Transcriptions](/rest/api/speechtotext/transcriptions) | Use transcriptions to transcribe a large amount of audio in storage.<br/><br/>When you use [batch transcription](batch-transcription.md) you send multiple files per request or point to an Azure Blob Storage container with the audio files to transcribe. See [Create a transcription](batch-transcription-create.md?pivots=rest-api) for examples of how to create a transcription from multiple audio files. | +| [Web hooks](/rest/api/speechtotext/web-hooks) | Use web hooks to receive notifications about creation, processing, completion, and deletion events.<br/><br/>You can use web hooks with [custom speech](custom-speech-overview.md) and [batch transcription](batch-transcription.md). Web hooks apply to [datasets](/rest/api/speechtotext/datasets), [endpoints](/rest/api/speechtotext/endpoints), [evaluations](/rest/api/speechtotext/evaluations), [models](/rest/api/speechtotext/models), and [transcriptions](/rest/api/speechtotext/transcriptions). | ++## Custom speech ++The following operation groups are applicable for [custom speech](custom-speech-overview.md). ++| Operation group | Description | +||| +| [Datasets](/rest/api/speechtotext/datasets) | Use datasets to train and test custom speech models.<br/><br/>For example, you can compare the performance of a [custom speech](custom-speech-overview.md) trained with a specific dataset to the performance of a base model or custom speech model trained with a different dataset. See [Upload training and testing datasets](how-to-custom-speech-upload-data.md?pivots=rest-api) for examples of how to upload datasets. | +| [Endpoints](/rest/api/speechtotext/endpoints) | Deploy custom speech models to endpoints.<br/><br/>You must deploy a custom endpoint to use a [custom speech](custom-speech-overview.md) model. See [Deploy a model](how-to-custom-speech-deploy-model.md?pivots=rest-api) for examples of how to manage deployment endpoints. | +| [Evaluations](/rest/api/speechtotext/evaluations) | Use evaluations to compare the performance of different models.<br/><br/>For example, you can compare the performance of a [custom speech](custom-speech-overview.md) model trained with a specific dataset to the performance of a base model or a custom model trained with a different dataset. See [test recognition quality](how-to-custom-speech-inspect-data.md?pivots=rest-api) and [test accuracy](how-to-custom-speech-evaluate-data.md?pivots=rest-api) for examples of how to test and evaluate custom speech models. | +| [Models](/rest/api/speechtotext/models) | Use base models or custom models to transcribe audio files.<br/><br/>You can use models with [custom speech](custom-speech-overview.md) and [batch transcription](batch-transcription.md). For example, you can use a model trained with a specific dataset to transcribe audio files. See [Train a model](how-to-custom-speech-train-model.md?pivots=rest-api) and [custom speech model lifecycle](how-to-custom-speech-model-and-endpoint-lifecycle.md?pivots=rest-api) for examples of how to train and manage custom speech models. | +| [Projects](/rest/api/speechtotext/projects) | Use projects to manage custom speech models, training and testing datasets, and deployment endpoints.<br/><br/>[Custom speech projects](custom-speech-overview.md) contain models, training and testing datasets, and deployment endpoints. Each project is specific to a [locale](language-support.md?tabs=stt). For example, you might create a project for English in the United States. See [Create a project](how-to-custom-speech-create-project.md?pivots=rest-api) for examples of how to create projects.| +| [Web hooks](/rest/api/speechtotext/web-hooks) | Use web hooks to receive notifications about creation, processing, completion, and deletion events.<br/><br/>You can use web hooks with [custom speech](custom-speech-overview.md) and [batch transcription](batch-transcription.md). Web hooks apply to [datasets](/rest/api/speechtotext/datasets), [endpoints](/rest/api/speechtotext/endpoints), [evaluations](/rest/api/speechtotext/evaluations), [models](/rest/api/speechtotext/models), and [transcriptions](/rest/api/speechtotext/transcriptions). | +++## Service health -<sup>1</sup> The `/webhooks/{id}/ping` operation (includes '/') in version 3.0 is replaced by the `/webhooks/{id}:ping` operation (includes ':') in version 3.1. +Service health provides insights about the overall health of the service and subcomponents. See [Service Health](/rest/api/speechtotext/service-health) for more information. -<sup>2</sup> The `/webhooks/{id}/test` operation (includes '/') in version 3.0 is replaced by the `/webhooks/{id}:test` operation (includes ':') in version 3.1. ## Next steps |
ai-services | Speech Services Quotas And Limits | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/speech-services-quotas-and-limits.md | The limits in this table apply per Speech resource when you create a custom spee | Max acoustic dataset file size for data import | 2 GB | 2 GB | | Max language dataset file size for data import | 200 MB | 1.5 GB | | Max pronunciation dataset file size for data import | 1 KB | 1 MB |-| Max text size when you're using the `text` parameter in the [Models_Create](https://westcentralus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Models_Create/) API request | 200 KB | 500 KB | +| Max text size when you're using the `text` parameter in the [Models_Create](/rest/api/speechtotext/models/create) API request | 200 KB | 500 KB | ### Text to speech quotas and limits per resource |
ai-services | Swagger Documentation | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/swagger-documentation.md | The Speech service offers a Swagger specification to interact with a handful of ## Generating code from the Swagger specification -The [Swagger specification](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1) has options that allow you to quickly test for various paths. However, sometimes it's desirable to generate code for all paths, creating a single library of calls that you can base future solutions on. Let's take a look at the process to generate a Python library. +The [Swagger specification](https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Speech/SpeechToText/stable/v3.1/speechtotext.json) has options that allow you to quickly test for various paths. However, sometimes it's desirable to generate code for all paths, creating a single library of calls that you can base future solutions on. Let's take a look at the process to generate a Python library for the Speech to text REST API version 3.1. You need to set Swagger to the region of your Speech resource. You can confirm the region in the **Overview** part of your Speech resource settings in Azure portal. The complete list of supported regions is available [here](regions.md#speech-service). -1. In a browser, go to the Swagger specification for your [region](regions.md#speech-service): - `https://<your-region>.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1` -1. On that page, select **API definition**, and select **Swagger**. Copy the URL of the page that appears. -1. In a new browser, go to [https://editor.swagger.io](https://editor.swagger.io) -1. Select **File**, select **Import URL**, paste the URL, and select **OK**. +1. In a browser, go to [https://editor.swagger.io](https://editor.swagger.io) +1. Select **File**, select **Import URL**, +1. Enter the URL `https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Speech/SpeechToText/stable/v3.1/speechtotext.json` and select **OK**. 1. Select **Generate Client** and select **python**. The client library downloads to your computer in a `.zip` file. 1. Extract everything from the download. You might use `tar -xf` to extract everything. 1. Install the extracted module into your Python environment: |
ai-services | Whisper Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/speech-service/whisper-overview.md | Whisper Model via Azure AI Speech might be best for: - Customization of the Whisper base model to improve accuracy for your scenario (coming soon) Regional support is another consideration. -- The Whisper model via Azure OpenAI Service is available in the following regions: North Central US and West Europe. -- The Whisper model via Azure AI Speech is available in the following regions: East US, Southeast Asia, and West Europe.+- The Whisper model via Azure OpenAI Service is available in the following regions: EastUS 2, India South, North Central, Norway East, Sweden Central, and West Europe. +- The Whisper model via Azure AI Speech is available in the following regions: Australia East, East US, North Central US, South Central US, Southeast Asia, UK South, and West Europe. ## Next steps |
ai-services | Configuration | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/configuration.md | + + Title: Configure containers - Translator ++description: The Translator container runtime environment is configured using the `docker run` command arguments. There are both required and optional settings. +# ++++ Last updated : 04/08/2024++recommendations: false +++# Configure Translator Docker containers ++Azure AI services provide each container with a common configuration framework. You can easily configure your Translator containers to build Translator application architecture optimized for robust cloud capabilities and edge locality. ++The **Translator** container runtime environment is configured using the `docker run` command arguments. This container has both required and optional settings. The required container-specific settings are the billing settings. ++## Configuration settings ++The container has the following configuration settings: ++|Required|Setting|Purpose| +|--|--|--| +|Yes|[ApiKey](#apikey-configuration-setting)|Tracks billing information.| +|No|[ApplicationInsights](#applicationinsights-setting)|Enables adding [Azure Application Insights](/azure/application-insights) telemetric support to your container.| +|Yes|[Billing](#billing-configuration-setting)|Specifies the endpoint URI of the service resource on Azure.| +|Yes|[EULA](#eula-setting)| Indicates that you accepted the end-user license agreement (EULA) for the container.| +|No|[Fluentd](#fluentd-settings)|Writes log and, optionally, metric data to a Fluentd server.| +|No|HTTP Proxy|Configures an HTTP proxy for making outbound requests.| +|No|[Logging](#logging-settings)|Provides ASP.NET Core logging support for your container. | +|Yes|[Mounts](#mount-settings)|Reads and writes data from the host computer to the container and from the container back to the host computer.| ++ > [!IMPORTANT] +> The [**ApiKey**](#apikey-configuration-setting), [**Billing**](#billing-configuration-setting), and [**EULA**](#eula-setting) settings are used together, and you must provide valid values for all three of them; otherwise your container won't start. For more information about using these configuration settings to instantiate a container. ++## ApiKey configuration setting ++The `ApiKey` setting specifies the Azure resource key used to track billing information for the container. You must specify a value for the ApiKey and the value must be a valid key for the _Translator_ resource specified for the [`Billing`](#billing-configuration-setting) configuration setting. ++This setting can be found in the following place: ++* Azure portal: **Translator** resource management, under **Keys** ++## ApplicationInsights setting +++## Billing configuration setting ++The `Billing` setting specifies the endpoint URI of the _Translator_ resource on Azure used to meter billing information for the container. You must specify a value for this configuration setting, and the value must be a valid endpoint URI for a _Translator_ resource on Azure. The container reports usage about every 10 to 15 minutes. ++This setting can be found in the following place: ++* Azure portal: **Translator** Overview page labeled `Endpoint` ++| Required | Name | Data type | Description | +| -- | - | | -- | +| Yes | `Billing` | String | Billing endpoint URI. For more information on obtaining the billing URI, see [gathering required parameters](translator-how-to-install-container.md#required-input). For more information and a complete list of regional endpoints, see [Custom subdomain names for Azure AI services](../../cognitive-services-custom-subdomains.md). | ++## EULA setting +++## Fluentd settings +++## HTTP/HTTPS proxy credentials settings ++If you need to configure an HTTP proxy for making outbound requests, use these two arguments: ++| Name | Data type | Description | +|--|--|--| +|HTTPS_PROXY|string|The proxy to use, for example, `https://proxy:8888`<br>`<proxy-url>`| +|HTTP_PROXY_CREDS|string|Any credentials needed to authenticate against the proxy, for example, `username:password`. This value **must be in lower-case**. | +|`<proxy-user>`|string|The user for the proxy.| +|`<proxy-password>`|string|The password associated with `<proxy-user>` for the proxy.| +|||| ++```bash +docker run --rm -it -p 5000:5000 \ +--memory 2g --cpus 1 \ +--mount type-bind,src=/home/azureuser/output,target=/output \ +<registry-location>/<image-name> \ +Eula=accept \ +Billing=<endpoint> \ +ApiKey=<api-key> \ +HTTPS_PROXY=<proxy-url> \ +HTTP_PROXY_CREDS=<proxy-user>:<proxy-password> \ +``` ++## Logging settings ++Translator containers support the following logging providers: ++|Provider|Purpose| +|--|--| +|[Console](/aspnet/core/fundamentals/logging/#console-provider)|The ASP.NET Core `Console` logging provider. All of the ASP.NET Core configuration settings and default values for this logging provider are supported.| +|[Debug](/aspnet/core/fundamentals/logging/#debug-provider)|The ASP.NET Core `Debug` logging provider. All of the ASP.NET Core configuration settings and default values for this logging provider are supported.| +|[Disk](#disk-logging)|The JSON logging provider. This logging provider writes log data to the output mount.| ++* The `Logging` settings manage ASP.NET Core logging support for your container. You can use the same configuration settings and values for your container that you use for an ASP.NET Core application. ++* The `Logging.LogLevel` specifies the minimum level to log. The severity of the `LogLevel` ranges from 0 to 6. When a `LogLevel` is specified, logging is enabled for messages at the specified level and higher: Trace = 0, Debug = 1, Information = 2, Warning = 3, Error = 4, Critical = 5, None = 6. ++* Currently, Translator containers have the ability to restrict logs at the **Warning** LogLevel or higher. ++The general command syntax for logging is as follows: ++```bash + -Logging:LogLevel:{Provider}={FilterSpecs} +``` ++The following command starts the Docker container with the `LogLevel` set to **Warning** and logging provider set to **Console**. This command prints anomalous or unexpected events during the application flow to the console: ++```bash +docker run --rm -it -p 5000:5000 +-v /mnt/d/TranslatorContainer:/usr/local/models \ +-e apikey={API_KEY} \ +-e eula=accept \ +-e billing={ENDPOINT_URI} \ +-e Languages=en,fr,es,ar,ru \ +-e Logging:LogLevel:Console="Warning" +mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest ++``` ++### Disk logging ++The `Disk` logging provider supports the following configuration settings: ++| Name | Data type | Description | +||--|-| +| `Format` | String | The output format for log files.<br/> **Note:** This value must be set to `json` to enable the logging provider. If this value is specified without also specifying an output mount while instantiating a container, an error occurs. | +| `MaxFileSize` | Integer | The maximum size, in megabytes (MB), of a log file. When the size of the current log file meets or exceeds this value, the logging provider starts a new log file. If -1 is specified, the size of the log file is limited only by the maximum file size, if any, for the output mount. The default value is 1. | ++#### Disk provider example ++```bash +docker run --rm -it -p 5000:5000 \ +--memory 2g --cpus 1 \ +--mount type-bind,src=/home/azureuser/output,target=/output \ +-e apikey={API_KEY} \ +-e eula=accept \ +-e billing={ENDPOINT_URI} \ +-e Languages=en,fr,es,ar,ru \ +Eula=accept \ +Billing=<endpoint> \ +ApiKey=<api-key> \ +Logging:Disk:Format=json \ +Mounts:Output=/output +``` ++For more information about configuring ASP.NET Core logging support, see [Settings file configuration](/aspnet/core/fundamentals/logging/). ++## Mount settings ++Use bind mounts to read and write data to and from the container. You can specify an input mount or output mount by specifying the `--mount` option in the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command. ++## Next steps ++> [!div class="nextstepaction"] +> [Learn more about Azure AI containers](../../cognitive-services-container-support.md) |
ai-services | Install Run | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/install-run.md | + + Title: Install and run Translator container using Docker API ++description: Use the Translator container and API to translate text and documents. +# ++++ Last updated : 04/08/2024++recommendations: false +keywords: on-premises, Docker, container, identify +++<!-- markdownlint-disable MD001 --> +<!-- markdownlint-disable MD033 --> ++# Install and run Azure AI Translator container ++> [!IMPORTANT] +> +> * To use the Translator container, you must submit an online request and have it approved. For more information, *see* [Request container access](overview.md#request-container-access). +> * Azure AI Translator container supports limited features compared to the cloud offerings. ++Containers enable you to host the Azure AI Translator API on your own infrastructure. The container image includes all libraries, tools, and dependencies needed to run an application consistently in any private, public, or personal computing environment. If your security or data governance requirements can't be fulfilled by calling Azure AI Translator API remotely, containers are a good option. ++In this article, learn how to install and run the Translator container online with Docker API. The Azure AI Translator container supports the following operations: ++* **Text Translation**. Translate the contextual meaning of words or phrases from supported `source` to supported `target` language in real time. For more information, *see* [**Container: translate text**](translator-container-supported-parameters.md). ++* **Text Transliteration**. Convert text from one language script or writing system to another language script or writing system in real time. For more information, *see* [Container: transliterate text](transliterate-text-parameters.md). ++* **Document translation**. Synchronously translate documents while preserving structure and format in real time. For more information, *see* [Container:translate documents](translate-document-parameters.md). ++## Prerequisites ++To get started, you need the following resources, access approval, and tools: ++##### Azure resources ++* An active [**Azure subscription**](https://portal.azure.com/). If you don't have one, you can [**create a free 12-month account**](https://azure.microsoft.com/free/). ++* An approved access request to either a [Translator connected container](https://aka.ms/csgate-translator) or [Translator disconnected container](https://aka.ms/csdisconnectedcontainers). ++* An [**Azure AI Translator resource**](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) (**not** a multi-service Azure AI services resource) created under the approved subscription ID. You need the API key and endpoint URI associated with your resource. Both values are required to start the container and can be found on the resource overview page in the Azure portal. ++ * For Translator **connected** containers, select theΓÇ»`S1`ΓÇ»pricing tier. + * For Translator **disconnected** containers, select **`Commitment tier disconnected containers`** as your pricing tier. You only see the option to purchase a commitment tier if your disconnected container access request is approved. ++ :::image type="content" source="media/disconnected-pricing-tier.png" alt-text="A screenshot showing resource creation on the Azure portal."::: ++##### Docker tools ++You should have a basic understanding of Docker concepts like registries, repositories, containers, and container images, as well as knowledge of basic `docker` [terminology and commands](/dotnet/architecture/microservices/container-docker-introduction/docker-terminology). For a primer on Docker and container basics, see the [Docker overview](https://docs.docker.com/engine/docker-overview/). ++ > [!TIP] + > + > Consider adding **Docker Desktop** to your computing environment. Docker Desktop is a graphical user interface (GUI) that enables you to build, run, and share containerized applications directly from your desktop. + > + > DockerDesktop includes Docker Engine, Docker CLI client, Docker Compose and provides packages that configure Docker for your preferred operating system: + > + > * [macOS](https://docs.docker.com/docker-for-mac/), + > * [Windows](https://docs.docker.com/docker-for-windows/) + > * [Linux](https://docs.docker.com/engine/installation/#supported-platforms). ++|Tool|Description|Condition| +|-|--|| +|[**Docker Engine**](https://docs.docker.com/engine/)|The **Docker Engine** is the core component of the Docker containerization platform. It must be installed on a [host computer](#host-computer-requirements) to enable you to build, run, and manage your containers.|***Required*** for all operations.| +|[**Docker Compose**](https://docs.docker.com/compose/)| The **Docker Compose** tool is used to define and run multi-container applications.|***Required*** for [supporting containers](#use-cases-for-supporting-containers).| +|[**Docker CLI**](https://docs.docker.com/engine/reference/commandline/cli/)|The Docker command-line interface enables you to interact with Docker Engine and manage Docker containers directly from your local machine.|***Recommended***| ++##### Host computer requirements +++##### Recommended CPU cores and memory ++> [!NOTE] +> The minimum and recommended specifications are based on Docker limits, not host machine resources. ++The following table describes the minimum and recommended specifications and the allowable Transactions Per Second (TPS) for each container. ++ |Function | Minimum recommended |Notes| + |--||| + |Text translation| 4 Core, 4-GB memory || + |Text transliteration| 4 Core, 2-GB memory || + |Document translation | 4 Core, 6-GB memory|The number of documents that can be processed concurrently can be calculated with the following formula: [minimum of (`n-2`), (`m-6)/4`)]. <br>• `n` is number of CPU cores.<br>• `m` is GB of memory.<br>• **Example**: 8 Core, 32-GB memory can process six(6) concurrent documents [minimum of (`8-2`), `(36-6)/4)`].| ++* Each core must be at least 2.6 gigahertz (GHz) or faster. ++* For every language pair, 2 GB of memory is recommended. ++* In addition to baseline requirements, 4 GB of memory for every concurrent document processing. ++ > [!TIP] + > You can use the [docker images](https://docs.docker.com/engine/reference/commandline/images/) command to list your downloaded container images. For example, the following command lists the ID, repository, and tag of each downloaded container image, formatted as a table: + > + > ```docker + > docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}" + > + > IMAGE ID REPOSITORY TAG + > <image-id> <repository-path/name> <tag-name> + > ``` ++## Required input ++All Azure AI containers require the following input values: ++* **EULA accept setting**. You must have an end-user license agreement (EULA) set with a value of `Eula=accept`. ++* **API key** and **Endpoint URL**. The API key is used to start the container. You can retrieve the API key and Endpoint URL values by navigating to your Azure AI Translator resource **Keys and Endpoint** page and selecting the `Copy to clipboard` <span class="docon docon-edit-copy x-hidden-focus"></span> icon. ++* If you're translating documents, be sure to use the document translation endpoint. ++> [!IMPORTANT] +> +> * Keys are used to access your Azure AI resource. Do not share your keys. Store them securely, for example, using Azure Key Vault. +> +> * We also recommend regenerating these keys regularly. Only one key is necessary to make an API call. When regenerating the first key, you can use the second key for continued access to the service. ++## Billing ++* Queries to the container are billed at the pricing tier of the Azure resource used for the API `Key`. ++* You're billed for each container instance used to process your documents and images. ++* The [docker run](https://docs.docker.com/engine/reference/commandline/run/) command downloads an image from Microsoft Artifact Registry and starts the container when all three of the following options are provided with valid values: ++| Option | Description | +|--|-| +| `ApiKey` | The key of the Azure AI services resource used to track billing information.<br/>The value of this option must be set to a key for the provisioned resource specified in `Billing`. | +| `Billing` | The endpoint of the Azure AI services resource used to track billing information.<br/>The value of this option must be set to the endpoint URI of a provisioned Azure resource.| +| `Eula` | Indicates that you accepted the license for the container.<br/>The value of this option must be set to **accept**. | ++### Connecting to Azure ++* The container billing argument values allow the container to connect to the billing endpoint and run. ++* The container reports usage about every 10 to 15 minutes. If the container doesn't connect to Azure within the allowed time window, the container continues to run, but doesn't serve queries until the billing endpoint is restored. ++* A connection is attempted 10 times at the same time interval of 10 to 15 minutes. If it can't connect to the billing endpoint within the 10 tries, the container stops serving requests. See the [Azure AI container FAQ](../../../ai-services/containers/container-faq.yml#how-does-billing-work) for an example of the information sent to Microsoft for billing. ++## Container images and tags ++The Azure AI services container images can be found in the [**Microsoft Artifact Registry**](https://mcr.microsoft.com/catalog?page=3) catalog. Azure AI Translator container resides within the azure-cognitive-services/translatorΓÇ»repository and is namedΓÇ»`text-translation`.ΓÇ»The fully qualified container image name isΓÇ»`mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest`. ++To use the latest version of the container, use theΓÇ»latestΓÇ»tag. You can view the full list ofΓÇ»[Azure AI services Text Translation](https://mcr.microsoft.com/product/azure-cognitive-services/translator/text-translation/tags)ΓÇ»version tags on MCR. ++## Use containers ++Select a tab to choose your Azure AI Translator container environment: ++## [**Connected containers**](#tab/connected) ++Azure AI Translator containers enable you to run the Azure AI Translator service `on-premise` in your own environment. Connected containers run locally and send usage information to the cloud for billing. ++## Download and run container image ++The [docker run](https://docs.docker.com/engine/reference/commandline/run/) command downloads an image from Microsoft Artifact Registry and starts the container. ++> [!IMPORTANT] +> +> * The docker commands in the following sections use the back slash, `\`, as a line continuation character. Replace or remove this based on your host operating system's requirements. +> * The `EULA`, `Billing`, and `ApiKey` options must be specified to run the container; otherwise, the container won't start. +> * If you're translating documents, be sure to use the document translation endpoint. ++```bash +docker run --rm -it -p 5000:5000 --memory 12g --cpus 4 \ +-v /mnt/d/TranslatorContainer:/usr/local/models \ +-e apikey={API_KEY} \ +-e eula=accept \ +-e billing={ENDPOINT_URI} \ +-e Languages=en,fr,es,ar,ru \ +mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest +``` ++The above command: ++* Creates a running Translator container from a downloaded container image. +* Allocates 12 gigabytes (GB) of memory and four CPU core. +* Exposes transmission control protocol (TCP) port 5000 and allocates a pseudo-TTY for the container. Now, the `localhost` address points to the container itself, not your host machine. +* Accepts the end-user agreement (EULA). +* Configures billing endpoint. +* Downloads translation models for languages English, French, Spanish, Arabic, and Russian. +* Automatically removes the container after it exits. The container image is still available on the host computer. ++> [!TIP] +> Additional Docker command: +> +> * `docker ps` lists running containers. +> * `docker pause {your-container name}` pauses a running container. +> * `docker unpause {your-container-name}` unpauses a paused container. +> * `docker restart {your-container-name}` restarts a running container. +> * `docker exec` enables you to execute commands lto *detach* or *set environment variables* in a running container. +> +> For more information, *see* [docker CLI reference](https://docs.docker.com/engine/reference/commandline/docker/). ++### Run multiple containers on the same host ++If you intend to run multiple containers with exposed ports, make sure to run each container with a different exposed port. For example, run the first container on port 5000 and the second container on port 5001. ++You can have this container and a different Azure AI container running on the HOST together. You also can have multiple containers of the same Azure AI container running. ++## Query the Translator container endpoint ++The container provides a REST-based Translator endpoint API. Here's an example request with source language (`from=en`) specified: ++ ```bash + curl -X POST "http://localhost:5000/translate?api-version=3.0&from=en&to=zh-HANS" -H "Content-Type: application/json" -d "[{'Text':'Hello, what is your name?'}]" + ``` ++> [!NOTE] +> +> * Source language detection requires an additional container. For more information, *see* [Supporting containers](#use-cases-for-supporting-containers) +> +> * If the cURL POST request returns a `Service is temporarily unavailable` response the container isn't ready. Wait a few minutes, then try again. ++### [**Disconnected (offline) containers**](#tab/disconnected) ++Disconnected containers enable you to use the Azure AI Translator API by exporting the docker image to your machine with internet access and then using Docker offline. Disconnected containers are intended for scenarios where no connectivity with the cloud is needed for the containers to run. ++## Disconnected container commitment plan ++* Commitment plans for disconnected containers have a calendar year commitment period. ++* When you purchase a plan, you're charged the full price immediately. ++* During the commitment period, you can't change your commitment plan; however you can purchase more units at a pro-rated price for the remaining days in the year. ++* You have until midnight (UTC) on the last day of your commitment, to end or change a commitment plan. ++* You can choose a different commitment plan in the **Commitment tier pricing** settings of your resource under the **Resource Management** section. ++## Create a new Translator resource and purchase a commitment plan ++1. Create a [Translator resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) in the Azure portal. ++1. To create your resource, enter the applicable information. Be sure to select **Commitment tier disconnected containers** as your pricing tier. You only see the option to purchase a commitment tier if you're approved. ++ :::image type="content" source="media/disconnected-pricing-tier.png" alt-text="A screenshot showing resource creation on the Azure portal."::: ++1. Select **Review + Create** at the bottom of the page. Review the information, and select **Create**. ++### End a commitment plan ++* If you decide that you don't want to continue purchasing a commitment plan, you can set your resource's autorenewal to **Do not auto-renew**. ++* Your commitment plan expires on the displayed commitment end date. After this date, you won't be charged for the commitment plan. You're still able to continue using the Azure resource to make API calls, charged at pay-as-you-go pricing. ++* You have until midnight (UTC) on the last day of the year to end a commitment plan for disconnected containers. If you do so, you avoid charges for the following year. ++## Gather required parameters ++There are three required parameters for all Azure AI services' containers: ++* The end-user license agreement (EULA) must be present with a value of *accept*. ++* The ***Containers*** endpoint URL for your resource from the Azure portal. ++* The API key for your resource from the Azure portal. ++Both the endpoint URL and API key are needed when you first run the container to implement the disconnected usage configuration. You can find the key and endpoint on the **Key and endpoint** page for your resource in the Azure portal: ++ :::image type="content" source="media/keys-endpoint-container.png" alt-text="Screenshot of Azure portal keys and endpoint page."::: ++> [!IMPORTANT] +> You will only use your key and endpoint to configure the container to run in a disconnected. +> If you're translating **documents**, be sure to use the document translation endpoint. +> environment. After you configure the container, you won't need the key and endpoint values to send API requests. Store them securely, for example, using Azure Key Vault. Only one key is necessary for this process. ++## Pull and load the Translator container image ++1. You should have [Docker tools](#docker-tools) installed in your local environment. ++1. Download the Azure AI Translator container with `docker pull`. ++ |Docker pull command | Value |Format| + |-|-|| + |• **`docker pull [image]`**</br>• **`docker pull [image]:latest`**|The latest container image.|• mcr.microsoft.com/azure-cognitive-services/translator/text-translation</br> </br>• mcr.microsoft.com/azure-cognitive-services/translator/text-translation: latest | + |||| + |• **`docker pull [image]:[version]`** | A specific container image |mcr.microsoft.com/azure-cognitive-services/translator/text-translation:1.0.019410001-amd64 | ++ **Example Docker pull command:** ++ ```docker + docker pull mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest + ``` ++1. Save the image to a `.tar` file. ++1. Load the `.tar` file to your local Docker instance. For more information, *see* [Docker: load images from a file](https://docs.docker.com/reference/cli/docker/image/load/#input). ++ ```bash + $docker load --input {path-to-your-file}.tar ++ ``` ++## Configure the container to run in a disconnected environment ++Now that you downloaded your container, you can execute the `docker run` command with the following parameters: ++* **`DownloadLicense=True`**. This parameter downloads a license file that enables your Docker container to run when it isn't connected to the internet. It also contains an expiration date, after which the license file is invalid to run the container. You can only use the license file in corresponding approved container. +* **`Languages={language list}`**. You must include this parameter to download model files for the [languages](../language-support.md) you want to translate. ++> [!IMPORTANT] +> The `docker run` command will generate a template that you can use to run the container. The template contains parameters you'll need for the downloaded models and configuration file. Make sure you save this template. ++The following example shows the formatting for the `docker run` command with placeholder values. Replace these placeholder values with your own values. ++| Placeholder | Value | Format| +|:-|:-|::| +| `[image]` | The container image you want to use. | `mcr.microsoft.com/azure-cognitive-services/translator/text-translation` | +| `{LICENSE_MOUNT}` | The path where the license is downloaded, and mounted. | `/host/license:/path/to/license/directory` | + | `{MODEL_MOUNT_PATH}`| The path where the machine translation models are downloaded, and mounted. Your directory structure must be formatted as **/usr/local/models** | `/host/translator/models:/usr/local/models`| +| `{ENDPOINT_URI}` | The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, in the Azure portal. | `https://<your-custom-subdomain>.cognitiveservices.azure.com` | +| `{API_KEY}` | The key for your Text Translation resource. You can find it on your resource's **Key and endpoint** page, in the Azure portal. |`{string}`| +| `{LANGUAGES_LIST}` | List of language codes separated by commas. It's mandatory to have English (en) language as part of the list.| `en`, `fr`, `it`, `zu`, `uk` | +| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem. | `/path/to/license/directory` | ++ **Example `docker run` command** ++```bash ++docker run --rm -it -p 5000:5000 \ ++-v {MODEL_MOUNT_PATH} \ ++-v {LICENSE_MOUNT_PATH} \ ++-e Mounts:License={CONTAINER_LICENSE_DIRECTORY} \ ++-e DownloadLicense=true \ ++-e eula=accept \ ++-e billing={ENDPOINT_URI} \ ++-e apikey={API_KEY} \ ++-e Languages={LANGUAGES_LIST} \ ++[image] +``` ++### Translator translation models and container configuration ++After you [configured the container](#configure-the-container-to-run-in-a-disconnected-environment), the values for the downloaded translation models and container configuration will be generated and displayed in the container output: ++```bash + -e MODELS= usr/local/models/model1/, usr/local/models/model2/ + -e TRANSLATORSYSTEMCONFIG=/usr/local/models/Config/5a72fa7c-394b-45db-8c06-ecdfc98c0832 +``` ++## Run the container in a disconnected environment ++Once the license file is downloaded, you can run the container in a disconnected environment with your license, appropriate memory, and suitable CPU allocations. The following example shows the formatting of the `docker run` command with placeholder values. Replace these placeholders values with your own values. ++Whenever the container runs, the license file must be mounted to the container and the location of the license folder on the container's local filesystem must be specified with `Mounts:License=`. In addition, an output mount must be specified so that billing usage records can be written. ++|Placeholder | Value | Format| +|-|-|| +| `[image]`| The container image you want to use. | `mcr.microsoft.com/azure-cognitive-services/translator/text-translation` | +|`{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container. | `16g` | +| `{NUMBER_CPUS}` | The appropriate number of CPUs to allocate for your container. | `4` | +| `{LICENSE_MOUNT}` | The path where the license is located and mounted. | `/host/translator/license:/path/to/license/directory` | +|`{MODEL_MOUNT_PATH}`| The path where the machine translation models are downloaded, and mounted. Your directory structure must be formatted as **/usr/local/models** | `/host/translator/models:/usr/local/models`| +|`{MODELS_DIRECTORY_LIST}`|List of comma separated directories each having a machine translation model. | `/usr/local/models/enu_esn_generalnn_2022240501,/usr/local/models/esn_enu_generalnn_2022240501` | +| `{OUTPUT_PATH}` | The output path for logging [usage records](#usage-records). | `/host/output:/path/to/output/directory` | +| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem. | `/path/to/license/directory` | +| `{CONTAINER_OUTPUT_DIRECTORY}` | Location of the output folder on the container's local filesystem. | `/path/to/output/directory` | +|`{TRANSLATOR_CONFIG_JSON}`| Translator system configuration file used by container internally.| `/usr/local/models/Config/5a72fa7c-394b-45db-8c06-ecdfc98c0832` | ++ **Example `docker run` command** ++```docker ++docker run --rm -it -p 5000:5000 --memory {MEMORY_SIZE} --cpus {NUMBER_CPUS} \ ++-v {MODEL_MOUNT_PATH} \ ++-v {LICENSE_MOUNT_PATH} \ ++-v {OUTPUT_MOUNT_PATH} \ ++-e Mounts:License={CONTAINER_LICENSE_DIRECTORY} \ ++-e Mounts:Output={CONTAINER_OUTPUT_DIRECTORY} \ ++-e MODELS={MODELS_DIRECTORY_LIST} \ ++-e TRANSLATORSYSTEMCONFIG={TRANSLATOR_CONFIG_JSON} \ ++-e eula=accept \ ++[image] +``` ++### Troubleshooting ++Run the container with an output mount and logging enabled. These settings enable the container to generate log files that are helpful for troubleshooting issues that occur while starting or running the container. ++> [!TIP] +> For more troubleshooting information and guidance, see [Disconnected containers Frequently asked questions (FAQ)](../../containers/disconnected-container-faq.yml). ++++## Validate that a container is running ++There are several ways to validate that the container is running: ++* The container provides a homepage at `/` as a visual validation that the container is running. ++* You can open your favorite web browser and navigate to the external IP address and exposed port of the container in question. Use the following request URLs to validate the container is running. The example request URLs listed point to `http://localhost:5000`, but your specific container can vary. Keep in mind that you're navigating to your container's **External IP address** and exposed port. ++| Request URL | Purpose | +|--|--| +| `http://localhost:5000/` | The container provides a home page. | +| `http://localhost:5000/ready` | Requested with GET. Provides a verification that the container is ready to accept a query against the model. This request can be used for Kubernetes [liveness and readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/). | +| `http://localhost:5000/status` | Requested with GET. Verifies if the api-key used to start the container is valid without causing an endpoint query. This request can be used for Kubernetes [liveness and readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/). | +| `http://localhost:5000/swagger` | The container provides a full set of documentation for the endpoints and a **Try it out** feature. With this feature, you can enter your settings into a web-based HTML form and make the query without having to write any code. After the query returns, an example CURL command is provided to demonstrate the required HTTP headers and body format. | ++++## Stop the container +++## Use cases for supporting containers ++Some Translator queries require supporting containers to successfully complete operations. **If you are using Office documents and don't require source language detection, only the Translator container is required.** However if source language detection is required or you're using scanned PDF documents, supporting containers are required: ++The following table lists the required supporting containers for your text and document translation operations. The Translator container sends billing information to Azure via the Azure AI Translator resource on your Azure account. ++|Operation|Request query|Document type|Supporting containers| +|--|--|--|--| +|• Text translation<br>• Document Translation |`from` specified. |Office documents| None| +|• Text translation<br>• Document Translation|`from` not specified. Requires automatic language detection to determine the source language. |Office documents |Γ£ö∩╕Å [**Text analytics:language**](../../language-service/language-detection/how-to/use-containers.md) container| +|• Text translation<br>• Document Translation |`from` specified. |Scanned PDF documents| Γ£ö∩╕Å [**Vision:read**](../../computer-vision/computer-vision-how-to-install-containers.md) container| +|• Text translation<br>• Document Translation|`from` not specified requiring automatic language detection to determine source language.|Scanned PDF documents| Γ£ö∩╕Å [**Text analytics:language**](../../language-service/language-detection/how-to/use-containers.md) container<br><br>Γ£ö∩╕Å [**Vision:read**](../../computer-vision/computer-vision-how-to-install-containers.md) container| ++## Operate supporting containers with `docker compose` ++Docker compose is a tool that enables you to configure multi-container applications using a single YAML file typically named `compose.yaml`. Use the `docker compose up` command to start your container application and the `docker compose down` command to stop and remove your containers. ++If you installed Docker Desktop CLI, it includes Docker compose and its prerequisites. If you don't have Docker Desktop, see the [Installing Docker Compose overview](https://docs.docker.com/compose/install/). ++### Create your application ++1. Using your preferred editor or IDE, create a new directory for your app named `container-environment` or a name of your choice. ++1. Create a new YAML file named `compose.yaml`. Both the .yml or .yaml extensions can be used for the `compose` file. ++1. Copy and paste the following YAML code sample into your `compose.yaml` file. Replace `{TRANSLATOR_KEY}` and `{TRANSLATOR_ENDPOINT_URI}` with the key and endpoint values from your Azure portal Translator instance. If you're translating documents, make sure to use the `document translation endpoint`. ++1. The top-level name (`azure-ai-translator`, `azure-ai-language`, `azure-ai-read`) is parameter that you specify. ++1. The `container_name` is an optional parameter that sets a name for the container when it runs, rather than letting `docker compose` generate a name. ++ ```yml + + azure-ai-translator: + container_name: azure-ai-translator + image: mcr.microsoft.com/product/azure-cognitive-services/translator/text-translation:latest + environment: + - EULA=accept + - billing={TRANSLATOR_ENDPOINT_URI} + - apiKey={TRANSLATOR_KEY} + - AzureAiLanguageHost=http://azure-ai-language:5000 + - AzureAiReadHost=http://azure-ai-read:5000 + ports: + - "5000:5000" + azure-ai-language: + container_name: azure-ai-language + image: mcr.microsoft.com/azure-cognitive-services/textanalytics/language:latest + environment: + - EULA=accept + - billing={TRANSLATOR_ENDPOINT_URI} + - apiKey={TRANSLATOR_KEY} + azure-ai-read: + container_name: azure-ai-read + image: mcr.microsoft.com/azure-cognitive-services/vision/read:latest + environment: + - EULA=accept + - billing={TRANSLATOR_ENDPOINT_URI} + - apiKey={TRANSLATOR_KEY} + ``` ++1. Open a terminal navigate to the `container-environment` folder, and start the containers with the following `docker-compose` command: ++ ```bash + docker compose up + ``` ++1. To stop the containers, use the following command: ++ ```bash + docker compose down + ``` ++ > [!TIP] + > Helpful Docker commands: + > + > * `docker compose pause` pauses running containers. + > * `docker compose unpause {your-container-name}` unpauses paused containers. + > * `docker compose restart` restarts all stopped and running container with all its previous changes intact. If you make changes to your `compose.yaml` configuration, these changes aren't updated with the `docker compose restart` command. You have to use the `docker compose up` command to reflect updates and changes in the `compose.yaml` file. + > * `docker compose ps -a` lists all containers, including those that are stopped. + > * `docker compose exec` enables you to execute commands to *detach* or *set environment variables* in a running container. + > + > For more information, *see* [docker CLI reference](https://docs.docker.com/engine/reference/commandline/docker/). ++### Translator and supporting container images and tags ++The Azure AI services container images can be found in the [**Microsoft Artifact Registry**](https://mcr.microsoft.com/catalog?page=3) catalog. The following table lists the fully qualified image location for text and document translation: ++|Container|Image location|Notes| +|--|-|| +|Translator: Text and document translation| `mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest`| You can view the full list of [Azure AI services Text Translation](https://mcr.microsoft.com/product/azure-cognitive-services/translator/text-translation/tags) version tags on MCR.| +|Text analytics: language|`mcr.microsoft.com/azure-cognitive-services/textanalytics/language:latest` |You can view the full list of [Azure AI services Text Analytics Language](https://mcr.microsoft.com/product/azure-cognitive-services/textanalytics/language/tags) version tags on MCR.| +|Vision: read|`mcr.microsoft.com/azure-cognitive-services/vision/read:latest`|You can view the full list of [Azure AI services Computer Vision Read `OCR`](https://mcr.microsoft.com/product/azure-cognitive-services/vision/read/tags) version tags on MCR.| ++## Other parameters and commands ++Here are a few more parameters and commands you can use to run the container: ++#### Usage records ++When operating Docker containers in a disconnected environment, the container will write usage records to a volume where they're collected over time. You can also call a REST API endpoint to generate a report about service usage. ++#### Arguments for storing logs ++When run in a disconnected environment, an output mount must be available to the container to store usage logs. For example, you would include `-v /host/output:{OUTPUT_PATH}` and `Mounts:Output={OUTPUT_PATH}` in the following example, replacing `{OUTPUT_PATH}` with the path where the logs are stored: ++ **Example `docker run` command** ++```docker +docker run -v /host/output:{OUTPUT_PATH} ... <image> ... Mounts:Output={OUTPUT_PATH} +``` ++#### Environment variable names in Kubernetes deployments ++* Some Azure AI Containers, for example Translator, require users to pass environmental variable names that include colons (`:`) when running the container. ++* Kubernetes doesn't accept colons in environmental variable names. +To resolve, you can replace colons with two underscore characters (`__`) when deploying to Kubernetes. See the following example of an acceptable format for environmental variable names: ++```Kubernetes + env: + - name: Mounts__License + value: "/license" + - name: Mounts__Output + value: "/output" +``` ++This example replaces the default format for the `Mounts:License` and `Mounts:Output` environment variable names in the docker run command. ++#### Get usage records using the container endpoints ++The container provides two endpoints for returning records regarding its usage. ++#### Get all records ++The following endpoint provides a report summarizing all of the usage collected in the mounted billing record directory. ++```HTTP +https://<service>/records/usage-logs/ +``` ++***Example HTTPS endpoint to retrieve all records*** ++ `http://localhost:5000/records/usage-logs` ++#### Get records for a specific month ++The following endpoint provides a report summarizing usage over a specific month and year: ++```HTTP +https://<service>/records/usage-logs/{MONTH}/{YEAR} +``` ++***Example HTTPS endpoint to retrieve records for a specific month and year*** ++ `http://localhost:5000/records/usage-logs/03/2024` ++The usage-logs endpoints return a JSON response similar to the following example: ++***Connected container*** ++The `quantity` is the amount you're charged for connected container usage. ++ ```json + { + "apiType": "string", + "serviceName": "string", + "meters": [ + { + "name": "string", + "quantity": 256345435 + } + ] + } + ``` ++***Disconnected container*** ++ ```json + { + "type": "CommerceUsageResponse", + "meters": [ + { + "name": "CognitiveServices.TextTranslation.Container.OneDocumentTranslatedCharacters", + "quantity": 1250000, + "billedUnit": 1875000 + }, + { + "name": "CognitiveServices.TextTranslation.Container.TranslatedCharacters", + "quantity": 1250000, + "billedUnit": 1250000 + } + ], + "apiType": "texttranslation", + "serviceName": "texttranslation" + } + ``` ++The aggregated value of `billedUnit` for the following meters is counted towards the characters you licensed for your disconnected container usage: ++* `CognitiveServices.TextTranslation.Container.OneDocumentTranslatedCharacters` ++* `CognitiveServices.TextTranslation.Container.TranslatedCharacters` ++### Summary ++In this article, you learned concepts and workflows for downloading, installing, and running an Azure AI Translator container: ++* Azure AI Translator container supports text translation, synchronous document translation, and text transliteration. ++* Container images are downloaded from the container registry and run in Docker. ++* The billing information must be specified when you instantiate a container. ++## Next steps ++> [!div class="nextstepaction"] +> [Learn more about Azure AI container configuration](translator-container-configuration.md) [Learn more about container language support](../language-support.md#translation). + |
ai-services | Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/overview.md | + + Title: What is Azure AI Translator container? ++description: Translate text and documents using the Azure AI Translator container. ++++ Last updated : 04/08/2024++++# What is Azure AI Translator container? ++> [!IMPORTANT] +> +> * To use the Translator container, you must submit an online request and have it approved. For more information, *see* [Request container access](#request-container-access). +> * Azure AI Translator container supports limited features compared to the cloud offerings. For more information, *see* [**Container translate methods**](translator-container-supported-parameters.md). ++Azure AI Translator container enables you to build translator application architecture that is optimized for both robust cloud capabilities and edge locality. A container is a running instance of an executable software image. The Translator container image includes all libraries, tools, and dependencies needed to run an application consistently in any private, public, or personal computing environment. Containers are isolated, lightweight, portable, and are great for implementing specific security or data governance requirements. Translator container is available in [connected](#connected-containers) and [disconnected (offline)](#disconnected-containers) modalities. ++## Connected containers ++* **Translator connected container** is deployed on premises and processes content in your environment. It requires internet connectivity to transmit usage metadata for billing; however, your customer content isn't transmitted outside of your premises. ++You're billed for connected containers monthly, based on the usage and consumption. The container needs to be configured to send metering data to Azure, and transactions are billed accordingly. Queries to the container are billed at the pricing tier of the Azure resource used for the API Key. You're billed for each container instance used to process your documents and images. ++ ***Sample billing metadata transmitted by Translator connected container*** ++ The `quantity` is the amount you're charged for connected container usage. ++ ```json + { + "apiType": "texttranslation", + "id": "ab1cf234-0056-789d-e012-f3ghi4j5klmn", + "containerType": "123a5bc06d7e", + "quantity": 125000 ++ } + ``` ++## Disconnected containers ++* **Translator disconnected container** is deployed on premises and processes content in your environment. It doesn't require internet connectivity at runtime. Customer must license the container for projected usage over a year and is charged affront. ++Disconnected containers are offered through commitment tier pricing offered at a discounted rate compared to pay-as-you-go pricing. With commitment tier pricing, you can commit to using Translator Service features for a fixed fee, at a predictable total cost, based on the needs of your workload. Commitment plans for disconnected containers have a calendar year commitment period. ++When you purchase a plan, you're charged the full price immediately. During the commitment period, you can't change your commitment plan; however you can purchase more units at a pro-rated price for the remaining days in the year. You have until midnight (UTC) on the last day of your commitment, to end a commitment plan. ++ ***Sample billing metadata transmitted by Translator disconnected container*** ++ ```json + { + "type": "CommerceUsageResponse", + "meters": [ + { + "name": "CognitiveServices.TextTranslation.Container.OneDocumentTranslatedCharacters", + "quantity": 1250000, + "billedUnit": 1875000 + }, + { + "name": "CognitiveServices.TextTranslation.Container.TranslatedCharacters", + "quantity": 1250000, + "billedUnit": 1250000 + } + ], + "apiType": "texttranslation", + "serviceName": "texttranslation" + } +``` ++The aggregated value of `billedUnit` for the following meters is counted towards the characters you licensed for your disconnected container usage: ++* `CognitiveServices.TextTranslation.Container.OneDocumentTranslatedCharacters` ++* `CognitiveServices.TextTranslation.Container.TranslatedCharacters` +++## Request container access ++Translator containers are a gated offering. To use the Translator container, you must submit an online request and for approval. ++* To request access to a connected container, complete and submit the [**connected container access request form**](https://aka.ms/csgate-translator). ++* To request access t a disconnected container, complete and submit the [**disconnected container request form**](https://aka.ms/csdisconnectedcontainers). ++* The form requests information about you, your company, and the user scenario for which you use the container. After you submit the form, the Azure AI services team reviews it and emails you with a decision within 10 business days. ++ > [!IMPORTANT] + > ✔️ On the form, you must use an email address associated with an Azure subscription ID. + > + > ✔️ The Azure resource you use to run the container must have been created with the approved Azure subscription ID. + > + > ✔️ Check your email (both inbox and junk folders) for updates on the status of your application from Microsoft. ++* After you're approved, you'll be able to run the container after you download it from the Microsoft Container Registry (MCR). ++* You can't access the container if your Azure subscription is't approved. ++## Next steps ++[Install and run Azure AI translator containers](install-run.md). |
ai-services | Translate Document Parameters | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/translate-document-parameters.md | + + Title: "Container: Translate document method" ++description: Understand the parameters, headers, and body request/response messages for the Azure AI Translator container translate document operation. +# +++++ Last updated : 04/08/2024++++# Container: Translate Documents ++**Translate document with source language specified**. ++## Request URL (using cURL) ++`POST` request: ++```http + POST {Endpoint}/translate?api-version=3.0&to={to} +``` ++***With optional parameters*** ++```http +POST {Endpoint}/translate?api-version=3.0&from={from}&to={to}&textType={textType}&category={category}&profanityAction={profanityAction}&profanityMarker={profanityMarker}&includeAlignment={includeAlignment}&includeSentenceLength={includeSentenceLength}&suggestedFrom={suggestedFrom}&fromScript={fromScript}&toScript={toScript} +``` ++Example: ++```bash +`curl -i -X POST "http://localhost:5000/translator/document:translate?sourceLanguage=en&targetLanguage=hi&api-version=2023-11-01-preview" -F "document={path-to-your-document-with-file-extension};type={ContentType}/{file-extension" -o "{path-to-output-file-with-file-extension}"` +``` ++## Synchronous request headers and parameters ++Use synchronous translation processing to send a document as part of the HTTP request body and receive the translated document in the HTTP response. ++|Query parameter       |Description| Condition| +|||-| +|`-X` or `--request` `POST`|The -X flag specifies the request method to access the API.|*Required* | +|`{endpoint}` |The URL for your Document Translation resource endpoint|*Required* | +|`targetLanguage`|Specifies the language of the output document. The target language must be one of the supported languages included in the translation scope.|*Required* | +|`sourceLanguage`|Specifies the language of the input document. If the `sourceLanguage` parameter isn't specified, automatic language detection is applied to determine the source language. |*Optional*| +|`-H` or `--header` `"Ocp-Apim-Subscription-Key:{KEY}` | Request header that specifies the Document Translation resource key authorizing access to the API.|*Required*| +|`-F` or `--form` |The filepath to the document that you want to include with your request. Only one source document is allowed.|*Required*| +|• `document=`<br> • `type={contentType}/fileExtension` |• Path to the file location for your source document.</br> • Content type and file extension.</br></br> Ex: **"document=@C:\Test\test-file.md;type=text/markdown**|*Required*| +|`-o` or `--output`|The filepath to the response results.|*Required*| +|`-F` or `--form` |The filepath to an optional glossary to include with your request. The glossary requires a separate `--form` flag.|*Optional*| +| • `glossary=`<br> • `type={contentType}/fileExtension`|• Path to the file location for your optional glossary file.</br> • Content type and file extension.</br></br> Ex: **"glossary=@C:\Test\glossary-file.txt;type=text/plain**|*Optional*| ++Γ£ö∩╕Å For more information on **`contentType`**, *see* [**Supported document formats**](../document-translation/overview.md#synchronous-supported-document-formats). ++## Code sample: document translation ++> [!NOTE] +> +> * Each sample runs on the `localhost` that you specified with the `docker compose up` command. +> * While your container is running, `localhost` points to the container itself. +> * You don't have to use `localhost:5000`. You can use any port that is not already in use in your host environment. ++### Sample document ++For this project, you need a source document to translate. You can download our [document translation sample document](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/Translator/document-translation-sample.docx) for and store it in the same folder as your `compose.yaml` file (`container-environment`). The file name is `document-translation-sample.docx` and the source language is English. ++### Query Azure AI Translator endpoint (document) ++Here's an example cURL HTTP request using localhost:5000: ++```bash +curl -v "http://localhost:5000/translator/documents:translateDocument?from=en&to=es&api-version=v1.0" -F "document=@document-translation-sample-docx" +``` ++***Upon successful completion***: ++* The translated document is returned with the response. +* The successful POST method returns a `200 OK` response code indicating that the service created the request. ++## Next steps ++> [!div class="nextstepaction"] +> [Learn more about synchronous document translation](../document-translation/reference/synchronous-rest-api-guide.md) |
ai-services | Translate Text Parameters | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/translate-text-parameters.md | + + Title: "Container: Translate text method" ++description: Understand the parameters, headers, and body messages for the Azure AI Translator container translate document operation. +++++ Last updated : 04/08/2024++++# Container: Translate Text ++**Translate text**. ++## Request URL ++Send a `POST` request to: ++```HTTP +POST {Endpoint}/translate?api-version=3.0&&from={from}&to={to} +``` ++***Example request*** ++```rest +POST https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to=es ++[ + { + "Text": "I would really like to drive your car." + } +] ++``` ++***Example response*** ++```json +[ + { + "translations": [ + { + "text": "Realmente me gustar├¡a conducir su coche.", + "to": "es" + } + ] + } +] +``` +++## Request parameters ++Request parameters passed on the query string are: ++### Required parameters ++| Query parameter | Description |Condition| +| | || +| api-version | Version of the API requested by the client. Value must be `3.0`. |*Required parameter*| +| from |Specifies the language of the input text.|*Required parameter*| +| to |Specifies the language of the output text. For example, use `to=de` to translate to German.<br>It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. For example, use `to=de&to=it` to translate to German and Italian. |*Required parameter*| ++* You can query the service for `translation` scope [supported languages](../reference/v3-0-languages.md). +* *See also* [Language support for transliteration](../language-support.md#translation). ++### Optional parameters ++| Query parameter | Description | +| | | +| textType | _Optional parameter_. <br>Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a well-formed, complete element. Possible values are: `plain` (default) or `html`. | +| includeSentenceLength | _Optional parameter_. <br>Specifies whether to include sentence boundaries for the input text and the translated text. Possible values are: `true` or `false` (default). | ++### Request headers ++| Headers | Description |Condition| +| | || +| Authentication headers |*See* [available options for authentication](../reference/v3-0-reference.md#authentication). |*Required request header*| +| Content-Type |Specifies the content type of the payload. <br>Accepted value is `application/json; charset=UTF-8`. |*Required request header*| +| Content-Length |The length of the request body. |*Optional*| +| X-ClientTraceId | A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |*Optional*| ++## Request body ++The body of the request is a JSON array. Each array element is a JSON object with a string property named `Text`, which represents the string to translate. ++```json +[ + {"Text":"I would really like to drive your car around the block a few times."} +] +``` ++The following limitations apply: ++* The array can have at most 100 elements. +* The entire text included in the request can't exceed 10,000 characters including spaces. ++## Response body ++A successful response is a JSON array with one result for each string in the input array. A result object includes the following properties: ++* `translations`: An array of translation results. The size of the array matches the number of target languages specified through the `to` query parameter. Each element in the array includes: ++* `to`: A string representing the language code of the target language. ++* `text`: A string giving the translated text. ++* `sentLen`: An object returning sentence boundaries in the input and output texts. ++* `srcSentLen`: An integer array representing the lengths of the sentences in the input text. The length of the array is the number of sentences, and the values are the length of each sentence. ++* `transSentLen`: An integer array representing the lengths of the sentences in the translated text. The length of the array is the number of sentences, and the values are the length of each sentence. ++ Sentence boundaries are only included when the request parameter `includeSentenceLength` is `true`. ++ * `sourceText`: An object with a single string property named `text`, which gives the input text in the default script of the source language. `sourceText` property is present only when the input is expressed in a script that's not the usual script for the language. For example, if the input were Arabic written in Latin script, then `sourceText.text` would be the same Arabic text converted into Arab script. ++## Response headers ++| Headers | Description | +| | | +| X-RequestId | Value generated by the service to identify the request and used for troubleshooting purposes. | +| X-MT-System | Specifies the system type that was used for translation for each 'to' language requested for translation. The value is a comma-separated list of strings. Each string indicates a type: </br></br>▪ Custom - Request includes a custom system and at least one custom system was used during translation.</br>▪ Team - All other requests | ++## Response status codes ++If an error occurs, the request returns a JSON error response. The error code is a 6-digit number combining the 3-digit HTTP status code followed by a 3-digit number to further categorize the error. Common error codes can be found on the [v3 Translator reference page](../reference/v3-0-reference.md#errors). ++## Code samples: translate text ++> [!NOTE] +> +> * Each sample runs on the `localhost` that you specified with the `docker run` command. +> * While your container is running, `localhost` points to the container itself. +> * You don't have to use `localhost:5000`. You can use any port that is not already in use in your host environment. +> To specify a port, use the `-p` option. ++### Translate a single input ++This example shows how to translate a single sentence from English to Simplified Chinese. ++```bash +curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'Hello, what is your name?'}]" +``` ++The response body is: ++```json +[ + { + "translations":[ + {"text":"Σ╜áσÑ╜, Σ╜áσŽΣ╗ÇΣ╣êσÉìσ¡ù∩╝ƒ","to":"zh-Hans"} + ] + } +] +``` ++The `translations` array includes one element, which provides the translation of the single piece of text in the input. ++### Query Azure AI Translator endpoint (text) ++Here's an example cURL HTTP request using localhost:5000 that you specified with the `docker run` command: ++```bash + curl -X POST "http://localhost:5000/translate?api-version=3.0&from=en&to=zh-HANS" + -H "Content-Type: application/json" -d "[{'Text':'Hello, what is your name?'}]" +``` ++> [!NOTE] +> If you attempt the cURL POST request before the container is ready, you'll end up getting a *Service is temporarily unavailable* response. Wait until the container is ready, then try again. ++### Translate text using Swagger API ++#### English ↔ German ++1. Navigate to the Swagger page: `http://localhost:5000/swagger/https://docsupdatetracker.net/index.html` +1. Select **POST /translate** +1. Select **Try it out** +1. Enter the **From** parameter as `en` +1. Enter the **To** parameter as `de` +1. Enter the **api-version** parameter as `3.0` +1. Under **texts**, replace `string` with the following JSON ++```json + [ + { + "text": "hello, how are you" + } + ] +``` ++Select **Execute**, the resulting translations are output in the **Response Body**. You should see the following response: ++```json +"translations": [ + { + "text": "hallo, wie geht es dir", + "to": "de" + } + ] +``` ++### Translate text with Python ++#### English ↔ French ++```python +import requests, json ++url = 'http://localhost:5000/translate?api-version=3.0&from=en&to=fr' +headers = { 'Content-Type': 'application/json' } +body = [{ 'text': 'Hello, how are you' }] ++request = requests.post(url, headers=headers, json=body) +response = request.json() ++print(json.dumps( + response, + sort_keys=True, + indent=4, + ensure_ascii=False, + separators=(',', ': '))) +``` ++### Translate text with C#/.NET console app ++#### English ↔ Spanish ++Launch Visual Studio, and create a new console application. Edit the `*.csproj` file to add the `<LangVersion>7.1</LangVersion>` nodeΓÇöspecifies C# 7.1. Add the [Newtoonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) NuGet package version 11.0.2. ++In the `Program.cs` replace all the existing code with the following script: ++```csharp +using Newtonsoft.Json; +using System; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; ++namespace TranslateContainer +{ + class Program + { + const string ApiHostEndpoint = "http://localhost:5000"; + const string TranslateApi = "/translate?api-version=3.0&from=en&to=es"; ++ static async Task Main(string[] args) + { + var textToTranslate = "Sunny day in Seattle"; + var result = await TranslateTextAsync(textToTranslate); ++ Console.WriteLine(result); + Console.ReadLine(); + } ++ static async Task<string> TranslateTextAsync(string textToTranslate) + { + var body = new object[] { new { Text = textToTranslate } }; + var requestBody = JsonConvert.SerializeObject(body); ++ var client = new HttpClient(); + using (var request = + new HttpRequestMessage + { + Method = HttpMethod.Post, + RequestUri = new Uri($"{ApiHostEndpoint}{TranslateApi}"), + Content = new StringContent(requestBody, Encoding.UTF8, "application/json") + }) + { + // Send the request and await a response. + var response = await client.SendAsync(request); ++ return await response.Content.ReadAsStringAsync(); + } + } + } +} +``` ++### Translate multiple strings ++Translating multiple strings at once is simply a matter of specifying an array of strings in the request body. ++```bash +curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'Hello, what is your name?'}, {'Text':'I am fine, thank you.'}]" +``` ++The response contains the translation of all pieces of text in the exact same order as in the request. +The response body is: ++```json +[ + { + "translations":[ + {"text":"Σ╜áσÑ╜, Σ╜áσŽΣ╗ÇΣ╣êσÉìσ¡ù∩╝ƒ","to":"zh-Hans"} + ] + }, + { + "translations":[ + {"text":"µêæσ╛êσÑ╜∩╝îΦ░óΦ░óΣ╜áπÇé","to":"zh-Hans"} + ] + } +] +``` ++### Translate to multiple languages ++This example shows how to translate the same input to several languages in one request. ++```bash +curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans&to=de" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'Hello, what is your name?'}]" +``` ++The response body is: ++```json +[ + { + "translations":[ + {"text":"Σ╜áσÑ╜, Σ╜áσŽΣ╗ÇΣ╣êσÉìσ¡ù∩╝ƒ","to":"zh-Hans"}, + {"text":"Hallo, was ist dein Name?","to":"de"} + ] + } +] +``` ++### Translate content with markup and specify translated content ++It's common to translate content that includes markup such as content from an HTML page or content from an XML document. Include query parameter `textType=html` when translating content with tags. In addition, it's sometimes useful to exclude specific content from translation. You can use the attribute `class=notranslate` to specify content that should remain in its original language. In the following example, the content inside the first `div` element isn't translated, while the content in the second `div` element is translated. ++```html +<div class="notranslate">This will not be translated.</div> +<div>This will be translated. </div> +``` ++Here's a sample request to illustrate. ++```bash +curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans&textType=html" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'<div class=\"notranslate\">This will not be translated.</div><div>This will be translated.</div>'}]" +``` ++The response is: ++```json +[ + { + "translations":[ + {"text":"<div class=\"notranslate\">This will not be translated.</div><div>Φ┐Öσ░åΦó½τ┐╗Φ»æπÇé</div>","to":"zh-Hans"} + ] + } +] +``` ++### Translate with dynamic dictionary ++If you already know the translation you want to apply to a word or a phrase, you can supply it as markup within the request. The dynamic dictionary is only safe for proper nouns such as personal names and product names. ++The markup to supply uses the following syntax. ++```html +<mstrans:dictionary translation="translation of phrase">phrase</mstrans:dictionary> +``` ++For example, consider the English sentence "The word wordomatic is a dictionary entry." To preserve the word _wordomatic_ in the translation, send the request: ++```bash +curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=de" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'The word <mstrans:dictionary translation=\"wordomatic\">word or phrase</mstrans:dictionary> is a dictionary entry.'}]" +``` ++The result is: ++```json +[ + { + "translations":[ + {"text":"Das Wort \"wordomatic\" ist ein W├╢rterbucheintrag.","to":"de"} + ] + } +] +``` ++This feature works the same way with `textType=text` or with `textType=html`. The feature should be used sparingly. The appropriate and far better way of customizing translation is by using Custom Translator. Custom Translator makes full use of context and statistical probabilities. If you created training data that shows your work or phrase in context, you get better results. [Learn more about Custom Translator](../custom-translator/concepts/customization.md). ++## Request limits ++Each translate request is limited to 10,000 characters, across all the target languages you're translating to. For example, sending a translate request of 3,000 characters to translate to three different languages results in a request size of 3000x3 = 9,000 characters, which satisfy the request limit. You're charged per character, not by the number of requests. We recommended sending shorter requests. ++The following table lists array element and character limits for the Translator **translation** operation. ++| Operation | Maximum size of array element | Maximum number of array elements | Maximum request size (characters) | +|:-|:-|:-|:-| +| translate | 10,000 | 100 | 10,000 | ++## Use docker compose: Translator with supporting containers ++Docker compose is a tool enables you to configure multi-container applications using a single YAML file typically named `compose.yaml`. Use the `docker compose up` command to start your container application and the `docker compose down` command to stop and remove your containers. ++If you installed Docker Desktop CLI, it includes Docker compose and its prerequisites. If you don't have Docker Desktop, see the [Installing Docker Compose overview](https://docs.docker.com/compose/install/). ++The following table lists the required supporting containers for your text and document translation operations. The Translator container sends billing information to Azure via the Azure AI Translator resource on your Azure account. ++|Operation|Request query|Document type|Supporting containers| +|--|--|--|--| +|• Text translation<br>• Document Translation |`from` specified. |Office documents| None| +|• Text translation<br>• Document Translation|`from` not specified. Requires automatic language detection to determine the source language. |Office documents |Γ£ö∩╕Å [**Text analytics:language**](../../language-service/language-detection/how-to/use-containers.md) container| +|• Text translation<br>• Document Translation |`from` specified. |Scanned PDF documents| Γ£ö∩╕Å [**Vision:read**](../../computer-vision/computer-vision-how-to-install-containers.md) container| +|• Text translation<br>• Document Translation|`from` not specified requiring automatic language detection to determine source language.|Scanned PDF documents| Γ£ö∩╕Å [**Text analytics:language**](../../language-service/language-detection/how-to/use-containers.md) container<br><br>Γ£ö∩╕Å [**Vision:read**](../../computer-vision/computer-vision-how-to-install-containers.md) container| ++##### Container images and tags ++The Azure AI services container images can be found in the [**Microsoft Artifact Registry**](https://mcr.microsoft.com/catalog?page=3) catalog. The following table lists the fully qualified image location for text and document translation: ++|Container|Image location|Notes| +|--|-|| +|Translator: Text translation| `mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest`| You can view the full list of [Azure AI services Text Translation](https://mcr.microsoft.com/product/azure-cognitive-services/translator/text-translation/tags) version tags on MCR.| +|Translator: Document translation|**TODO**| **TODO**| +|Text analytics: language|`mcr.microsoft.com/azure-cognitive-services/textanalytics/language:latest` |You can view the full list of [Azure AI services Text Analytics Language](https://mcr.microsoft.com/product/azure-cognitive-services/textanalytics/language/tags) version tags on MCR.| +|Vision: read|`mcr.microsoft.com/azure-cognitive-services/vision/read:latest`|You can view the full list of [Azure AI services Computer Vision Read `OCR`](https://mcr.microsoft.com/product/azure-cognitive-services/vision/read/tags) version tags on MCR.| ++### Create your application ++1. Using your preferred editor or IDE, create a new directory for your app named `container-environment` or a name of your choice. +1. Create a new YAML file named `compose.yaml`. Both the .yml or .yaml extensions can be used for the `compose` file. +1. Copy and paste the following YAML code sample into your `compose.yaml` file. Replace `{TRANSLATOR_KEY}` and `{TRANSLATOR_ENDPOINT_URI}` with the key and endpoint values from your Azure portal Translator instance. Make sure you use the `document translation endpoint`. +1. The top-level name (`azure-ai-translator`, `azure-ai-language`, `azure-ai-read`) is parameter that you specify. +1. The `container_name` is an optional parameter that sets a name for the container when it runs, rather than letting `docker compose` generate a name. ++ ```yml + + azure-ai-translator: + container_name: azure-ai-translator + image: mcr.microsoft.com/product/azure-cognitive-services/translator/text-translation:latest + environment: + - EULA=accept + - billing={TRANSLATOR_ENDPOINT_URI} + - apiKey={TRANSLATOR_KEY} + - AzureAiLanguageHost=http://azure-ai-language:5000 + - AzureAiReadHost=http://azure-ai-read:5000 + ports: + - "5000:5000" + azure-ai-language: + container_name: azure-ai-language + image: mcr.microsoft.com/azure-cognitive-services/textanalytics/language:latest + environment: + - EULA=accept + - billing={TRANSLATOR_ENDPOINT_URI} + - apiKey={TRANSLATOR_KEY} + azure-ai-read: + container_name: azure-ai-read + image: mcr.microsoft.com/azure-cognitive-services/vision/read:latest + environment: + - EULA=accept + - billing={TRANSLATOR_ENDPOINT_URI} + - apiKey={TRANSLATOR_KEY} + ``` ++1. Open a terminal navigate to the `container-environment` folder, and start the containers with the following `docker-compose` command: ++ ```bash + docker compose up + ``` ++1. To stop the containers, use the following command: ++ ```bash + docker compose down + ``` ++ > [!TIP] + > **`docker compose` commands:** + > + > * `docker compose pause` pauses running containers. + > * `docker compose unpause {your-container-name}` unpauses paused containers. + > * `docker compose restart` restarts all stopped and running container with all its previous changes intact. If you make changes to your `compose.yaml` configuration, these changes aren't updated with the `docker compose restart` command. You have to use the `docker compose up` command to reflect updates and changes in the `compose.yaml` file. + > * `docker compose ps -a` lists all containers, including those that are stopped. + > * `docker compose exec` enables you to execute commands to *detach* or *set environment variables* in a running container. + > + > For more information, *see* [docker CLI reference](https://docs.docker.com/engine/reference/commandline/docker/). ++## Next Steps ++> [!div class="nextstepaction"] +> [Learn more about text translation](../translator-text-apis.md#translate-text) |
ai-services | Translator Container Supported Parameters | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/translator-container-supported-parameters.md | - Title: "Container: Translate method"- -description: Understand the parameters, headers, and body messages for the container Translate method of Azure AI Translator to translate text. -# ----- Previously updated : 07/18/2023----# Container: Translate --Translate text. --## Request URL --Send a `POST` request to: --```HTTP -http://localhost:{port}/translate?api-version=3.0 -``` --Example: http://<span></span>localhost:5000/translate?api-version=3.0 --## Request parameters --Request parameters passed on the query string are: --### Required parameters --| Query parameter | Description | -| | | -| api-version | _Required parameter_. <br>Version of the API requested by the client. Value must be `3.0`. | -| from | _Required parameter_. <br>Specifies the language of the input text. Find which languages are available to translate from by looking up [supported languages](../reference/v3-0-languages.md) using the `translation` scope.| -| to | _Required parameter_. <br>Specifies the language of the output text. The target language must be one of the [supported languages](../reference/v3-0-languages.md) included in the `translation` scope. For example, use `to=de` to translate to German. <br>It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. For example, use `to=de&to=it` to translate to German and Italian. | --### Optional parameters --| Query parameter | Description | -| | | -| textType | _Optional parameter_. <br>Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a well-formed, complete element. Possible values are: `plain` (default) or `html`. | -| includeSentenceLength | _Optional parameter_. <br>Specifies whether to include sentence boundaries for the input text and the translated text. Possible values are: `true` or `false` (default). | --Request headers include: --| Headers | Description | -| | | -| Authentication header(s) | _Required request header_. <br>See [available options for authentication](../reference/v3-0-reference.md#authentication). | -| Content-Type | _Required request header_. <br>Specifies the content type of the payload. <br>Accepted value is `application/json; charset=UTF-8`. | -| Content-Length | _Required request header_. <br>The length of the request body. | -| X-ClientTraceId | _Optional_. <br>A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. | --## Request body --The body of the request is a JSON array. Each array element is a JSON object with a string property named `Text`, which represents the string to translate. --```json -[ - {"Text":"I would really like to drive your car around the block a few times."} -] -``` --The following limitations apply: --* The array can have at most 100 elements. -* The entire text included in the request can't exceed 10,000 characters including spaces. --## Response body --A successful response is a JSON array with one result for each string in the input array. A result object includes the following properties: --* `translations`: An array of translation results. The size of the array matches the number of target languages specified through the `to` query parameter. Each element in the array includes: --* `to`: A string representing the language code of the target language. --* `text`: A string giving the translated text. --* `sentLen`: An object returning sentence boundaries in the input and output texts. --* `srcSentLen`: An integer array representing the lengths of the sentences in the input text. The length of the array is the number of sentences, and the values are the length of each sentence. --* `transSentLen`: An integer array representing the lengths of the sentences in the translated text. The length of the array is the number of sentences, and the values are the length of each sentence. -- Sentence boundaries are only included when the request parameter `includeSentenceLength` is `true`. -- * `sourceText`: An object with a single string property named `text`, which gives the input text in the default script of the source language. `sourceText` property is present only when the input is expressed in a script that's not the usual script for the language. For example, if the input were Arabic written in Latin script, then `sourceText.text` would be the same Arabic text converted into Arab script. --Examples of JSON responses are provided in the [examples](#examples) section. --## Response headers --| Headers | Description | -| | | -| X-RequestId | Value generated by the service to identify the request. It's used for troubleshooting purposes. | -| X-MT-System | Specifies the system type that was used for translation for each 'to' language requested for translation. The value is a comma-separated list of strings. Each string indicates a type: </br></br>▪ Custom - Request includes a custom system and at least one custom system was used during translation.</br>▪ Team - All other requests | --## Response status codes --If an error occurs, the request will also return a JSON error response. The error code is a 6-digit number combining the 3-digit HTTP status code followed by a 3-digit number to further categorize the error. Common error codes can be found on the [v3 Translator reference page](../reference/v3-0-reference.md#errors). --## Examples --### Translate a single input --This example shows how to translate a single sentence from English to Simplified Chinese. --```curl -curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'Hello, what is your name?'}]" -``` --The response body is: --``` -[ - { - "translations":[ - {"text":"Σ╜áσÑ╜, Σ╜áσŽΣ╗ÇΣ╣êσÉìσ¡ù∩╝ƒ","to":"zh-Hans"} - ] - } -] -``` --The `translations` array includes one element, which provides the translation of the single piece of text in the input. --### Translate multiple pieces of text --Translating multiple strings at once is simply a matter of specifying an array of strings in the request body. --```curl -curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'Hello, what is your name?'}, {'Text':'I am fine, thank you.'}]" -``` --The response contains the translation of all pieces of text in the exact same order as in the request. -The response body is: --``` -[ - { - "translations":[ - {"text":"Σ╜áσÑ╜, Σ╜áσŽΣ╗ÇΣ╣êσÉìσ¡ù∩╝ƒ","to":"zh-Hans"} - ] - }, - { - "translations":[ - {"text":"µêæσ╛êσÑ╜∩╝îΦ░óΦ░óΣ╜áπÇé","to":"zh-Hans"} - ] - } -] -``` --### Translate to multiple languages --This example shows how to translate the same input to several languages in one request. --```curl -curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans&to=de" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'Hello, what is your name?'}]" -``` --The response body is: --``` -[ - { - "translations":[ - {"text":"Σ╜áσÑ╜, Σ╜áσŽΣ╗ÇΣ╣êσÉìσ¡ù∩╝ƒ","to":"zh-Hans"}, - {"text":"Hallo, was ist dein Name?","to":"de"} - ] - } -] -``` --### Translate content with markup and decide what's translated --It's common to translate content that includes markup such as content from an HTML page or content from an XML document. Include query parameter `textType=html` when translating content with tags. In addition, it's sometimes useful to exclude specific content from translation. You can use the attribute `class=notranslate` to specify content that should remain in its original language. In the following example, the content inside the first `div` element won't be translated, while the content in the second `div` element will be translated. --``` -<div class="notranslate">This will not be translated.</div> -<div>This will be translated. </div> -``` --Here's a sample request to illustrate. --```curl -curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=zh-Hans&textType=html" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'<div class=\"notranslate\">This will not be translated.</div><div>This will be translated.</div>'}]" -``` --The response is: --``` -[ - { - "translations":[ - {"text":"<div class=\"notranslate\">This will not be translated.</div><div>Φ┐Öσ░åΦó½τ┐╗Φ»æπÇé</div>","to":"zh-Hans"} - ] - } -] -``` --### Translate with dynamic dictionary --If you already know the translation you want to apply to a word or a phrase, you can supply it as markup within the request. The dynamic dictionary is only safe for proper nouns such as personal names and product names. --The markup to supply uses the following syntax. --``` -<mstrans:dictionary translation="translation of phrase">phrase</mstrans:dictionary> -``` --For example, consider the English sentence "The word wordomatic is a dictionary entry." To preserve the word _wordomatic_ in the translation, send the request: --``` -curl -X POST "http://localhost:{port}/translate?api-version=3.0&from=en&to=de" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'The word <mstrans:dictionary translation=\"wordomatic\">word or phrase</mstrans:dictionary> is a dictionary entry.'}]" -``` --The result is: --``` -[ - { - "translations":[ - {"text":"Das Wort \"wordomatic\" ist ein W├╢rterbucheintrag.","to":"de"} - ] - } -] -``` --This feature works the same way with `textType=text` or with `textType=html`. The feature should be used sparingly. The appropriate and far better way of customizing translation is by using Custom Translator. Custom Translator makes full use of context and statistical probabilities. If you've created training data that shows your work or phrase in context, you'll get much better results. [Learn more about Custom Translator](../custom-translator/concepts/customization.md). --## Request limits --Each translate request is limited to 10,000 characters, across all the target languages you're translating to. For example, sending a translate request of 3,000 characters to translate to three different languages results in a request size of 3000x3 = 9,000 characters, which satisfy the request limit. You're charged per character, not by the number of requests. It's recommended to send shorter requests. --The following table lists array element and character limits for the Translator **translation** operation. --| Operation | Maximum size of array element | Maximum number of array elements | Maximum request size (characters) | -|:-|:-|:-|:-| -| translate | 10,000 | 100 | 10,000 | |
ai-services | Translator Disconnected Containers | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/translator-disconnected-containers.md | - Title: Use Translator Docker containers in disconnected environments- -description: Learn how to run Azure AI Translator containers in disconnected environments. -# ---- Previously updated : 07/28/2023----<!--┬ámarkdownlint-disable┬áMD036┬á--> -<!--┬ámarkdownlint-disable┬áMD001┬á--> --# Use Translator containers in disconnected environments -- Azure AI Translator containers allow you to use Translator Service APIs with the benefits of containerization. Disconnected containers are offered through commitment tier pricing offered at a discounted rate compared to pay-as-you-go pricing. With commitment tier pricing, you can commit to using Translator Service features for a fixed fee, at a predictable total cost, based on the needs of your workload. --## Get started --Before attempting to run a Docker container in an offline environment, make sure you're familiar with the following requirements to successfully download and use the container: --* Host computer requirements and recommendations. -* The Docker `pull` command to download the container. -* How to validate that a container is running. -* How to send queries to the container's endpoint, once it's running. --## Request access to use containers in disconnected environments --Complete and submit the [request form](https://aka.ms/csdisconnectedcontainers) to request access to the containers disconnected from the Internet. ---Access is limited to customers that meet the following requirements: --* Your organization should be identified as strategic customer or partner with Microsoft. -* Disconnected containers are expected to run fully offline, hence your use cases must meet at least one of these or similar requirements: - * Environment or device(s) with zero connectivity to internet. - * Remote location that occasionally has internet access. - * Organization under strict regulation of not sending any kind of data back to cloud. -* Application completed as instructed. Make certain to pay close attention to guidance provided throughout the application to ensure you provide all the necessary information required for approval. --## Create a new resource and purchase a commitment plan --1. Create a [Translator resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) in the Azure portal. --1. Enter the applicable information to create your resource. Be sure to select **Commitment tier disconnected containers** as your pricing tier. -- > [!NOTE] - > - > * You will only see the option to purchase a commitment tier if you have been approved by Microsoft. -- :::image type="content" source="../media/create-resource-offline-container.png" alt-text="A screenshot showing resource creation on the Azure portal."::: --1. Select **Review + Create** at the bottom of the page. Review the information, and select **Create**. --## Gather required parameters --There are three required parameters for all Azure AI services' containers: --* The end-user license agreement (EULA) must be present with a value of *accept*. -* The endpoint URL for your resource from the Azure portal. -* The API key for your resource from the Azure portal. --Both the endpoint URL and API key are needed when you first run the container to configure it for disconnected usage. You can find the key and endpoint on the **Key and endpoint** page for your resource in the Azure portal: -- :::image type="content" source="../media/quickstarts/keys-and-endpoint-portal.png" alt-text="Screenshot of Azure portal keys and endpoint page."::: --> [!IMPORTANT] -> You will only use your key and endpoint to configure the container to run in a disconnected environment. After you configure the container, you won't need the key and endpoint values to send API requests. Store them securely, for example, using Azure Key Vault. Only one key is necessary for this process. --## Download a Docker container with `docker pull` --Download the Docker container that has been approved to run in a disconnected environment. For example: --|Docker pull command | Value |Format| -|-|-|| -|• **`docker pull [image]`**</br>• **`docker pull [image]:latest`**|The latest container image.|• mcr.microsoft.com/azure-cognitive-services/translator/text-translation</br> </br>• mcr.microsoft.com/azure-cognitive-services/translator/text-translation: latest | -||| -|• **`docker pull [image]:[version]`** | A specific container image |mcr.microsoft.com/azure-cognitive-services/translator/text-translation:1.0.019410001-amd64 | -- **Example Docker pull command** --```docker -docker pull mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest -``` --## Configure the container to run in a disconnected environment --Now that you've downloaded your container, you need to execute the `docker run` command with the following parameters: --* **`DownloadLicense=True`**. This parameter downloads a license file that enables your Docker container to run when it isn't connected to the internet. It also contains an expiration date, after which the license file is invalid to run the container. You can only use the license file in corresponding approved container. -* **`Languages={language list}`**. You must include this parameter to download model files for the [languages](../language-support.md) you want to translate. --> [!IMPORTANT] -> The `docker run` command will generate a template that you can use to run the container. The template contains parameters you'll need for the downloaded models and configuration file. Make sure you save this template. --The following example shows the formatting for the `docker run` command with placeholder values. Replace these placeholder values with your own values. --| Placeholder | Value | Format| -|-|-|| -| `[image]` | The container image you want to use. | `mcr.microsoft.com/azure-cognitive-services/translator/text-translation` | -| `{LICENSE_MOUNT}` | The path where the license is downloaded, and mounted. | `/host/license:/path/to/license/directory` | - | `{MODEL_MOUNT_PATH}`| The path where the machine translation models are downloaded, and mounted. Your directory structure must be formatted as **/usr/local/models** | `/host/translator/models:/usr/local/models`| -| `{ENDPOINT_URI}` | The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, in the Azure portal. | `https://<your-custom-subdomain>.cognitiveservices.azure.com` | -| `{API_KEY}` | The key for your Text Translation resource. You can find it on your resource's **Key and endpoint** page, in the Azure portal. |`{string}`| -| `{LANGUAGES_LIST}` | List of language codes separated by commas. It's mandatory to have English (en) language as part of the list.| `en`, `fr`, `it`, `zu`, `uk` | -| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem. | `/path/to/license/directory` | -- **Example `docker run` command** --```docker --docker run --rm -it -p 5000:5000 \ ---v {MODEL_MOUNT_PATH} \---v {LICENSE_MOUNT_PATH} \---e Mounts:License={CONTAINER_LICENSE_DIRECTORY} \---e DownloadLicense=true \---e eula=accept \---e billing={ENDPOINT_URI} \---e apikey={API_KEY} \---e Languages={LANGUAGES_LIST} \--[image] -``` --### Translator translation models and container configuration --After you've [configured the container](#configure-the-container-to-run-in-a-disconnected-environment), the values for the downloaded translation models and container configuration will be generated and displayed in the container output: --```bash - -e MODELS= usr/local/models/model1/, usr/local/models/model2/ - -e TRANSLATORSYSTEMCONFIG=/usr/local/models/Config/5a72fa7c-394b-45db-8c06-ecdfc98c0832 -``` --## Run the container in a disconnected environment --Once the license file has been downloaded, you can run the container in a disconnected environment with your license, appropriate memory, and suitable CPU allocations. The following example shows the formatting of the `docker run` command with placeholder values. Replace these placeholders values with your own values. --Whenever the container is run, the license file must be mounted to the container and the location of the license folder on the container's local filesystem must be specified with `Mounts:License=`. In addition, an output mount must be specified so that billing usage records can be written. --Placeholder | Value | Format| -|-|-|| -| `[image]`| The container image you want to use. | `mcr.microsoft.com/azure-cognitive-services/translator/text-translation` | - `{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container. | `16g` | -| `{NUMBER_CPUS}` | The appropriate number of CPUs to allocate for your container. | `4` | -| `{LICENSE_MOUNT}` | The path where the license is located and mounted. | `/host/translator/license:/path/to/license/directory` | -|`{MODEL_MOUNT_PATH}`| The path where the machine translation models are downloaded, and mounted. Your directory structure must be formatted as **/usr/local/models** | `/host/translator/models:/usr/local/models`| -|`{MODELS_DIRECTORY_LIST}`|List of comma separated directories each having a machine translation model. | `/usr/local/models/enu_esn_generalnn_2022240501,/usr/local/models/esn_enu_generalnn_2022240501` | -| `{OUTPUT_PATH}` | The output path for logging [usage records](#usage-records). | `/host/output:/path/to/output/directory` | -| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem. | `/path/to/license/directory` | -| `{CONTAINER_OUTPUT_DIRECTORY}` | Location of the output folder on the container's local filesystem. | `/path/to/output/directory` | -|`{TRANSLATOR_CONFIG_JSON}`| Translator system configuration file used by container internally.| `/usr/local/models/Config/5a72fa7c-394b-45db-8c06-ecdfc98c0832` | -- **Example `docker run` command** --```docker --docker run --rm -it -p 5000:5000 --memory {MEMORY_SIZE} --cpus {NUMBER_CPUS} \ ---v {MODEL_MOUNT_PATH} \---v {LICENSE_MOUNT_PATH} \---v {OUTPUT_MOUNT_PATH} \---e Mounts:License={CONTAINER_LICENSE_DIRECTORY} \---e Mounts:Output={CONTAINER_OUTPUT_DIRECTORY} \---e MODELS={MODELS_DIRECTORY_LIST} \---e TRANSLATORSYSTEMCONFIG={TRANSLATOR_CONFIG_JSON} \---e eula=accept \--[image] -``` --## Other parameters and commands --Here are a few more parameters and commands you may need to run the container: --#### Usage records --When operating Docker containers in a disconnected environment, the container will write usage records to a volume where they're collected over time. You can also call a REST API endpoint to generate a report about service usage. --#### Arguments for storing logs --When run in a disconnected environment, an output mount must be available to the container to store usage logs. For example, you would include `-v /host/output:{OUTPUT_PATH}` and `Mounts:Output={OUTPUT_PATH}` in the following example, replacing `{OUTPUT_PATH}` with the path where the logs are stored: -- **Example `docker run` command** --```docker -docker run -v /host/output:{OUTPUT_PATH} ... <image> ... Mounts:Output={OUTPUT_PATH} -``` -#### Environment variable names in Kubernetes deployments --Some Azure AI Containers, for example Translator, require users to pass environmental variable names that include colons (`:`) when running the container. This will work fine when using Docker, but Kubernetes does not accept colons in environmental variable names. -To resolve this, you can replace colons with two underscore characters (`__`) when deploying to Kubernetes. See the following example of an acceptable format for environmental variable names: --```Kubernetes - env: - - name: Mounts__License - value: "/license" - - name: Mounts__Output - value: "/output" -``` --This example replaces the default format for the `Mounts:License` and `Mounts:Output` environment variable names in the docker run command. --#### Get records using the container endpoints --The container provides two endpoints for returning records regarding its usage. --#### Get all records --The following endpoint provides a report summarizing all of the usage collected in the mounted billing record directory. --```HTTP -https://<service>/records/usage-logs/ -``` -- **Example HTTPS endpoint** -- `http://localhost:5000/records/usage-logs` --The usage-logs endpoint returns a JSON response similar to the following example: --```json -{ -"apiType": "string", -"serviceName": "string", -"meters": [ -{ - "name": "string", - "quantity": 256345435 - } - ] -} -``` --#### Get records for a specific month --The following endpoint provides a report summarizing usage over a specific month and year: --```HTTP -https://<service>/records/usage-logs/{MONTH}/{YEAR} -``` --This usage-logs endpoint returns a JSON response similar to the following example: --```json -{ - "apiType": "string", - "serviceName": "string", - "meters": [ - { - "name": "string", - "quantity": 56097 - } - ] -} -``` --### Purchase a different commitment plan for disconnected containers --Commitment plans for disconnected containers have a calendar year commitment period. When you purchase a plan, you're charged the full price immediately. During the commitment period, you can't change your commitment plan, however you can purchase more unit(s) at a pro-rated price for the remaining days in the year. You have until midnight (UTC) on the last day of your commitment, to end a commitment plan. --You can choose a different commitment plan in the **Commitment tier pricing** settings of your resource under the **Resource Management** section. --### End a commitment plan -- If you decide that you don't want to continue purchasing a commitment plan, you can set your resource's autorenewal to **Do not auto-renew**. Your commitment plan expires on the displayed commitment end date. After this date, you won't be charged for the commitment plan. You're still able to continue using the Azure resource to make API calls, charged at pay-as-you-go pricing. You have until midnight (UTC) on the last day of the year to end a commitment plan for disconnected containers. If you do so, you avoid charges for the following year. --## Troubleshooting --Run the container with an output mount and logging enabled. These settings enable the container to generate log files that are helpful for troubleshooting issues that occur while starting or running the container. --> [!TIP] -> For more troubleshooting information and guidance, see [Disconnected containers Frequently asked questions (FAQ)](../../containers/disconnected-container-faq.yml). --That's it! You've learned how to create and run disconnected containers for Azure AI Translator Service. --## Next steps --> [!div class="nextstepaction"] -> [Request parameters for Translator text containers](translator-container-supported-parameters.md) |
ai-services | Translator How To Install Container | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/translator-how-to-install-container.md | - Title: Install and run Docker containers for Translator API- -description: Use the Docker container for Translator API to translate text. -# ---- Previously updated : 07/18/2023--recommendations: false -keywords: on-premises, Docker, container, identify ---# Install and run Translator containers --Containers enable you to run several features of the Translator service in your own environment. Containers are great for specific security and data governance requirements. In this article you learn how to download, install, and run a Translator container. --Translator container enables you to build a translator application architecture that is optimized for both robust cloud capabilities and edge locality. --See the list of [languages supported](../language-support.md) when using Translator containers. --> [!IMPORTANT] -> -> * To use the Translator container, you must submit an online request and have it approved. For more information, _see_ [Request approval to run container](#request-approval-to-run-container). -> * Translator container supports limited features compared to the cloud offerings. For more information, _see_ [**Container translate methods**](translator-container-supported-parameters.md). --<!-- markdownlint-disable MD033 --> --## Prerequisites --To get started, you need an active [**Azure account**](https://azure.microsoft.com/free/cognitive-services/). If you don't have one, you can [**create a free account**](https://azure.microsoft.com/free/). --You also need: --| Required | Purpose | -|--|--| -| Familiarity with Docker | <ul><li>You should have a basic understanding of Docker concepts like registries, repositories, containers, and container images, as well as knowledge of basic `docker` [terminology and commands](/dotnet/architecture/microservices/container-docker-introduction/docker-terminology).</li></ul> | -| Docker Engine | <ul><li>You need the Docker Engine installed on a [host computer](#host-computer). Docker provides packages that configure the Docker environment on [macOS](https://docs.docker.com/docker-for-mac/), [Windows](https://docs.docker.com/docker-for-windows/), and [Linux](https://docs.docker.com/engine/installation/#supported-platforms). For a primer on Docker and container basics, see the [Docker overview](https://docs.docker.com/engine/docker-overview/).</li><li> Docker must be configured to allow the containers to connect with and send billing data to Azure. </li><li> On **Windows**, Docker must also be configured to support **Linux** containers.</li></ul> | -| Translator resource | <ul><li>An Azure [Translator](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) regional resource (not `global`) with an associated API key and endpoint URI. Both values are required to start the container and can be found on the resource overview page.</li></ul>| --|Optional|Purpose| -||-| -|Azure CLI (command-line interface) |<ul><li> The [Azure CLI](/cli/azure/install-azure-cli) enables you to use a set of online commands to create and manage Azure resources. It's available to install in Windows, macOS, and Linux environments and can be run in a Docker container and Azure Cloud Shell.</li></ul> | --## Required elements --All Azure AI containers require three primary elements: --* **EULA accept setting**. An end-user license agreement (EULA) set with a value of `Eula=accept`. --* **API key** and **Endpoint URL**. The API key is used to start the container. You can retrieve the API key and Endpoint URL values by navigating to the Translator resource **Keys and Endpoint** page and selecting the `Copy to clipboard` <span class="docon docon-edit-copy x-hidden-focus"></span> icon. --> [!IMPORTANT] -> -> * Keys are used to access your Azure AI resource. Do not share your keys. Store them securely, for example, using Azure Key Vault. We also recommend regenerating these keys regularly. Only one key is necessary to make an API call. When regenerating the first key, you can use the second key for continued access to the service. --## Host computer ---## Container requirements and recommendations --The following table describes the minimum and recommended CPU cores and memory to allocate for the Translator container. --| Container | Minimum |Recommended | Language Pair | -|--|||-| -| Translator |`2` cores, `4 GB` memory |`4` cores, `8 GB` memory | 2 | --* Each core must be at least 2.6 gigahertz (GHz) or faster. --* The core and memory correspond to the `--cpus` and `--memory` settings, which are used as part of the `docker run` command. --> [!NOTE] -> -> * CPU core and memory correspond to the `--cpus` and `--memory` settings, which are used as part of the docker run command. -> -> * The minimum and recommended specifications are based on Docker limits, not host machine resources. --## Request approval to run container --Complete and submit the [**Azure AI services -Application for Gated Services**](https://aka.ms/csgate-translator) to request access to the container. ----## Translator container image --The Translator container image can be found on the `mcr.microsoft.com` container registry syndicate. It resides within the `azure-cognitive-services/translator` repository and is named `text-translation`. The fully qualified container image name is `mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest`. --To use the latest version of the container, you can use the `latest` tag. You can find a full list of [tags on the MCR](https://mcr.microsoft.com/product/azure-cognitive-services/translator/text-translation/tags). --## Get container images with **docker commands** --> [!IMPORTANT] -> -> * The docker commands in the following sections use the back slash, `\`, as a line continuation character. Replace or remove this based on your host operating system's requirements. -> * The `EULA`, `Billing`, and `ApiKey` options must be specified to run the container; otherwise, the container won't start. --Use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to download a container image from Microsoft Container registry and run it. --```Docker -docker run --rm -it -p 5000:5000 --memory 12g --cpus 4 \ --v /mnt/d/TranslatorContainer:/usr/local/models \--e apikey={API_KEY} \--e eula=accept \--e billing={ENDPOINT_URI} \--e Languages=en,fr,es,ar,ru \-mcr.microsoft.com/azure-cognitive-services/translator/text-translation:latest -``` --The above command: --* Downloads and runs a Translator container from the container image. -* Allocates 12 gigabytes (GB) of memory and four CPU core. -* Exposes TCP port 5000 and allocates a pseudo-TTY for the container -* Accepts the end-user agreement (EULA) -* Configures billing endpoint -* Downloads translation models for languages English, French, Spanish, Arabic, and Russian -* Automatically removes the container after it exits. The container image is still available on the host computer. --### Run multiple containers on the same host --If you intend to run multiple containers with exposed ports, make sure to run each container with a different exposed port. For example, run the first container on port 5000 and the second container on port 5001. --You can have this container and a different Azure AI container running on the HOST together. You also can have multiple containers of the same Azure AI container running. --## Query the container's Translator endpoint -- The container provides a REST-based Translator endpoint API. Here's an example request: --```curl -curl -X POST "http://localhost:5000/translate?api-version=3.0&from=en&to=zh-HANS" - -H "Content-Type: application/json" -d "[{'Text':'Hello, what is your name?'}]" -``` --> [!NOTE] -> If you attempt the cURL POST request before the container is ready, you'll end up getting a *Service is temporarily unavailable* response. Wait until the container is ready, then try again. --## Stop the container ---## Troubleshoot --### Validate that a container is running --There are several ways to validate that the container is running: --* The container provides a homepage at `/` as a visual validation that the container is running. --* You can open your favorite web browser and navigate to the external IP address and exposed port of the container in question. Use the following request URLs to validate the container is running. The example request URLs listed point to `http://localhost:5000`, but your specific container may vary. Keep in mind that you're navigating to your container's **External IP address** and exposed port. --| Request URL | Purpose | -|--|--| -| `http://localhost:5000/` | The container provides a home page. | -| `http://localhost:5000/ready` | Requested with GET. Provides a verification that the container is ready to accept a query against the model. This request can be used for Kubernetes [liveness and readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/). | -| `http://localhost:5000/status` | Requested with GET. Verifies if the api-key used to start the container is valid without causing an endpoint query. This request can be used for Kubernetes [liveness and readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/). | -| `http://localhost:5000/swagger` | The container provides a full set of documentation for the endpoints and a **Try it out** feature. With this feature, you can enter your settings into a web-based HTML form and make the query without having to write any code. After the query returns, an example CURL command is provided to demonstrate the HTTP headers and body format that's required. | ----## Text translation code samples --### Translate text with swagger --#### English ↔ German --Navigate to the swagger page: `http://localhost:5000/swagger/https://docsupdatetracker.net/index.html` --1. Select **POST /translate** -1. Select **Try it out** -1. Enter the **From** parameter as `en` -1. Enter the **To** parameter as `de` -1. Enter the **api-version** parameter as `3.0` -1. Under **texts**, replace `string` with the following JSON --```json - [ - { - "text": "hello, how are you" - } - ] -``` --Select **Execute**, the resulting translations are output in the **Response Body**. You should expect something similar to the following response: --```json -"translations": [ - { - "text": "hallo, wie geht es dir", - "to": "de" - } - ] -``` --### Translate text with Python --```python -import requests, json --url = 'http://localhost:5000/translate?api-version=3.0&from=en&to=fr' -headers = { 'Content-Type': 'application/json' } -body = [{ 'text': 'Hello, how are you' }] --request = requests.post(url, headers=headers, json=body) -response = request.json() --print(json.dumps( - response, - sort_keys=True, - indent=4, - ensure_ascii=False, - separators=(',', ': '))) -``` --### Translate text with C#/.NET console app --Launch Visual Studio, and create a new console application. Edit the `*.csproj` file to add the `<LangVersion>7.1</LangVersion>` nodeΓÇöspecifies C# 7.1. Add the [Newtoonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) NuGet package, version 11.0.2. --In the `Program.cs` replace all the existing code with the following script: --```csharp -using Newtonsoft.Json; -using System; -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; --namespace TranslateContainer -{ - class Program - { - const string ApiHostEndpoint = "http://localhost:5000"; - const string TranslateApi = "/translate?api-version=3.0&from=en&to=de"; -- static async Task Main(string[] args) - { - var textToTranslate = "Sunny day in Seattle"; - var result = await TranslateTextAsync(textToTranslate); -- Console.WriteLine(result); - Console.ReadLine(); - } -- static async Task<string> TranslateTextAsync(string textToTranslate) - { - var body = new object[] { new { Text = textToTranslate } }; - var requestBody = JsonConvert.SerializeObject(body); -- var client = new HttpClient(); - using (var request = - new HttpRequestMessage - { - Method = HttpMethod.Post, - RequestUri = new Uri($"{ApiHostEndpoint}{TranslateApi}"), - Content = new StringContent(requestBody, Encoding.UTF8, "application/json") - }) - { - // Send the request and await a response. - var response = await client.SendAsync(request); -- return await response.Content.ReadAsStringAsync(); - } - } - } -} -``` --## Summary --In this article, you learned concepts and workflows for downloading, installing, and running Translator container. Now you know: --* Translator provides Linux containers for Docker. -* Container images are downloaded from the container registry and run in Docker. -* You can use the REST API to call 'translate' operation in Translator container by specifying the container's host URI. --## Next steps --> [!div class="nextstepaction"] -> [Learn more about Azure AI containers](../../cognitive-services-container-support.md?context=%2fazure%2fcognitive-services%2ftranslator%2fcontext%2fcontext) |
ai-services | Transliterate Text Parameters | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/containers/transliterate-text-parameters.md | + + Title: "Container: Transliterate document method" ++description: Understand the parameters, headers, and body messages for the Azure AI Translator container transliterate text operation. +# +++++ Last updated : 04/08/2024++++# Container: Transliterate Text ++Convert characters or letters of a source language to the corresponding characters or letters of a target language. ++## Request URL ++`POST` request: ++```HTTP + POST {Endpoint}/transliterate?api-version=3.0&language={language}&fromScript={fromScript}&toScript={toScript} ++``` ++*See* [**Virtual Network Support**](../reference/v3-0-reference.md#virtual-network-support) for Translator service selected network and private endpoint configuration and support. ++## Request parameters ++Request parameters passed on the query string are: ++| Query parameter | Description |Condition| +| | | | +| api-version |Version of the API requested by the client. Value must be `3.0`. |*Required parameter*| +| language |Specifies the source language of the text to convert from one script to another.| *Required parameter*| +| fromScript | Specifies the script used by the input text. |*Required parameter*| +| toScript |Specifies the output script.|*Required parameter*| ++* You can query the service for `transliteration` scope [supported languages](../reference/v3-0-languages.md). +* *See also* [Language support for transliteration](../language-support.md#transliteration). ++## Request headers ++| Headers | Description |Condition| +| | | | +| Authentication headers | *See* [available options for authentication](../reference/v3-0-reference.md#authentication)|*Required request header*| +| Content-Type | Specifies the content type of the payload. Possible value: `application/json` |*Required request header*| +| Content-Length |The length of the request body. |*Optional*| +| X-ClientTraceId |A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |*Optional*| ++## Response body ++A successful response is a JSON array with one result for each element in the input array. A result object includes the following properties: ++* `text`: A string that results from converting the input string to the output script. ++* `script`: A string specifying the script used in the output. ++## Response headers ++| Headers | Description | +| | | +| X-RequestId | Value generated by the service to identify the request. It can be used for troubleshooting purposes. | ++### Sample request ++```http +https://api.cognitive.microsofttranslator.com/transliterate?api-version=3.0&language=ja&fromScript=Jpan&toScript=Latn +``` ++### Sample request body ++The body of the request is a JSON array. Each array element is a JSON object with a string property named `Text`, which represents the string to convert. ++```json +[ + {"Text":"こんにちは"}, + {"Text":"さようなら"} +] +``` ++The following limitations apply: ++* The array can have a maximum of 10 elements. +* The text value of an array element can't exceed 1,000 characters including spaces. +* The entire text included in the request can't exceed 5,000 characters including spaces. ++### Sample JSON response: ++```json +[ + { + "text": "Kon'nichiwa​", + "script": "Latn" + }, + { + "text": "sayonara", + "script": "Latn" + } +] +``` ++## Code samples: transliterate text ++> [!NOTE] +> +> * Each sample runs on the `localhost` that you specified with the `docker run` command. +> * While your container is running, `localhost` points to the container itself. +> * You don't have to use `localhost:5000`. You can use any port that is not already in use in your host environment. +> To specify a port, use the `-p` option. ++### Transliterate with REST API ++```rest ++ POST https://api.cognitive.microsofttranslator.com/transliterate?api-version=3.0&language=ja&fromScript=Jpan&toScript=Latn HTTP/1.1 + Ocp-Apim-Subscription-Key: ba6c4278a6c0412da1d8015ef9930d44 + Content-Type: application/json ++ [ + {"Text":"こんにちは"}, + {"Text":"さようなら"} + ] +``` ++## Next Steps ++> [!div class="nextstepaction"] +> [Learn more about text transliteration](../translator-text-apis.md#transliterate-text) |
ai-services | Faq | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-services/translator/document-translation/faq.md | Title: Frequently asked questions - Document Translation -description: Get answers to frequently asked questions about Document Translation. +description: Get answers to Document Translation frequently asked questions. # Previously updated : 11/30/2023 Last updated : 03/11/2024 If the language of the content in the source document is known, we recommend tha #### To what extent are the layout, structure, and formatting maintained? -When text is translated from the source to target language, the overall length of translated text can differ from source. The result could be reflow of text across pages. The same fonts aren't always available in both source and target language. In general, the same font style is applied in target language to retain formatting closer to source. +When text is translated from the source to target language, the overall length of translated text can differ from source. The result could be reflow of text across pages. The same fonts aren't always available in both source and target language. In general, the same font style is applied in target language to retain formatting closer to source. #### Will the text in an image within a document gets translated? -No. The text in an image within a document isn't translated. +​No. The text in an image within a document isn't translated. #### Can Document Translation translate content from scanned documents? Yes. Document Translation translates content from _scanned PDF_ documents. #### Can encrypted or password-protected documents be translated? -No. The service can't translate encrypted or password-protected documents. If your scanned or text-embedded PDFs are password-locked, you must remove the lock before submission. +​No. The service can't translate encrypted or password-protected documents. If your scanned or text-embedded PDFs are password-locked, you must remove the lock before submission. #### If I'm using managed identities, do I also need a SAS token URL? -No. Don't include SAS token-appended URLS. Managed identities eliminate the need for you to include shared access signature tokens (SAS) with your HTTP requests. +​No. Don't include SAS token-appended URLs. Managed identities eliminate the need for you to include shared access signature tokens (SAS) with your HTTP requests. #### Which PDF format renders the best results? |
ai-studio | Architecture | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/concepts/architecture.md | The role assignment for each AI project's service principal has a condition that For more information on Azure access-based control, see [What is Azure attribute-based access control](/azure/role-based-access-control/conditions-overview). +## Containers in the storage account ++The default storage account for an AI hub has the following containers. These containers are created for each AI project, and the `{workspace-id}` prefix matches the unique ID for the AI project. The container is accessed by the AI project using a [connection](connections.md). ++> [!TIP] +> To find the ID for your AI project, go to the AI project in the [Azure portal](https://portal.azure.com/). Expand **Settings** and then select **Properties**. The **Workspace ID** is displayed. ++| Container name | Connection name | Description | +| | | | +| {workspace-ID}-azureml | workspaceartifactstore | Storage for assets such as metrics, models, and components. | +| {workspace-ID}-blobstore| workspaceblobstore | Storage for data upload, job code snapshots, and pipeline data cache. | +| {workspace-ID}-code | NA | Storage for notebooks, compute instances, and prompt flow. | +| {workspace-ID}-file | NA | Alternative container for data upload. | + ## Encryption Azure AI Studio uses encryption to protect data at rest and in transit. By default, Microsoft-managed keys are used for encryption. However you can use your own encryption keys. For more information, see [Customer-managed keys](../../ai-services/encryption/cognitive-services-encryption-keys-portal.md?context=/azure/ai-studio/context/context). |
ai-studio | Configure Managed Network | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/configure-managed-network.md | The Azure AI hub managed VNet feature is free. However, you're charged for the f * The managed VNet is deleted when the Azure AI is deleted. * Data exfiltration protection is automatically enabled for the only approved outbound mode. If you add other outbound rules, such as to FQDNs, Microsoft can't guarantee that you're protected from data exfiltration to those outbound destinations. * Using FQDN outbound rules increases the cost of the managed VNet because FQDN rules use Azure Firewall. For more information, see [Pricing](#pricing).+* When using a compute instance with a managed network, you can't connect to the compute instance using SSH. |
ai-studio | Configure Private Link | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/configure-private-link.md | Title: How to configure a private link for Azure AI + Title: How to configure a private link for Azure AI hub -description: Learn how to configure a private link for Azure AI +description: Learn how to configure a private link for Azure AI hub. A private link is used to secure communication with the AI hub. Previously updated : 02/13/2024 Last updated : 04/10/2024 +# Customer intent: As an admin, I want to configure a private link for Azure AI hub so that I can secure my Azure AI hub resources. -# How to configure a private link for Azure AI +# How to configure a private link for Azure AI hub [!INCLUDE [Azure AI Studio preview](../includes/preview-ai-studio.md)] -We have two network isolation aspects. One is the network isolation to access an Azure AI. Another is the network isolation of computing resources in your Azure AI and Azure AI projects such as Compute Instance, Serverless and Managed Online Endpoint. This document explains the former highlighted in the diagram. You can use private link to establish the private connection to your Azure AI and its default resources. This article is for Azure AI. For information on Azure AI Services, see the [Azure AI Services documentation](/azure/ai-services/cognitive-services-virtual-networks). +We have two network isolation aspects. One is the network isolation to access an Azure AI hub. Another is the network isolation of computing resources in your Azure AI hub and Azure AI projects such as compute instances, serverless, and managed online endpoints. This article explains the former highlighted in the diagram. You can use private link to establish the private connection to your Azure AI hub and its default resources. This article is for Azure AI Studio (AI hub and AI projects). For information on Azure AI Services, see the [Azure AI Services documentation](/azure/ai-services/cognitive-services-virtual-networks). -You get several Azure AI default resources in your resource group. You need to configure following network isolation configurations. +You get several Azure AI hub default resources in your resource group. You need to configure following network isolation configurations. -- Disable public network access flag of Azure AI default resources such as Storage, Key Vault, Container Registry.-- Establish private endpoint connection to Azure AI default resource. Note that you need to have blob and file PE for the default storage account.+- Disable public network access of Azure AI hub default resources such as Azure Storage, Azure Key Vault, and Azure Container Registry. +- Establish private endpoint connection to Azure AI hub default resources. You need to have both a blob and file private endpoint for the default storage account. - [Managed identity configurations](#managed-identity-configuration) to allow Azure AI hub resources access your storage account if it's private.-- Azure AI services and Azure AI Search should be public.+- Azure AI Services and Azure AI Search should be public. ## Prerequisites -* You must have an existing virtual network to create the private endpoint in. +* You must have an existing Azure Virtual Network to create the private endpoint in. > [!IMPORTANT] > We do not recommend using the 172.17.0.0/16 IP address range for your VNet. This is the default subnet range used by the Docker bridge network or on-premises. You get several Azure AI default resources in your resource group. You need to c Use one of the following methods to create an Azure AI hub resource with a private endpoint. Each of these methods __requires an existing virtual network__: +# [Azure portal](#tab/azure-portal) ++1. From the [Azure portal](https://portal.azure.com), go to Azure AI Studio and choose __+ New Azure AI__. +1. Choose network isolation mode in __Networking__ tab. +1. Scroll down to __Workspace Inbound access__ and choose __+ Add__. +1. Input required fields. When selecting the __Region__, select the same region as your virtual network. + # [Azure CLI](#tab/cli) Create your Azure AI hub resource with the Azure AI CLI. Run the following command and follow the prompts. For more information, see [Get started with Azure AI CLI](cli-install.md). Create your Azure AI hub resource with the Azure AI CLI. Run the following comma ai init ``` -After creating the Azure AI, use the [Azure networking CLI commands](/cli/azure/network/private-endpoint#az-network-private-endpoint-create) to create a private link endpoint for the Azure AI. +After creating the Azure AI hub, use the [Azure networking CLI commands](/cli/azure/network/private-endpoint#az-network-private-endpoint-create) to create a private link endpoint for the Azure AI. ```azurecli-interactive az network private-endpoint create \ az network private-endpoint dns-zone-group add \ --zone-name privatelink.notebooks.azure.net ``` -# [Azure portal](#tab/azure-portal) + -1. From the [Azure portal](https://portal.azure.com), go to Azure AI Studio and choose __+ New Azure AI__. -1. Choose network isolation mode in __Networking__ tab. -1. Scroll down to __Workspace Inbound access__ and choose __+ Add__. -1. Input required fields. When selecting the __Region__, select the same region as your virtual network. +## Add a private endpoint to an Azure AI hub -+Use one of the following methods to add a private endpoint to an existing Azure AI hub: -## Add a private endpoint to an Azure AI +# [Azure portal](#tab/azure-portal) -Use one of the following methods to add a private endpoint to an existing Azure AI: +1. From the [Azure portal](https://portal.azure.com), select your Azure AI hub. +1. From the left side of the page, select __Networking__ and then select the __Private endpoint connections__ tab. +1. When selecting the __Region__, select the same region as your virtual network. +1. When selecting __Resource type__, use `azuremlworkspace`. +1. Set the __Resource__ to your workspace name. ++Finally, select __Create__ to create the private endpoint. # [Azure CLI](#tab/cli) -Use the [Azure networking CLI commands](/cli/azure/network/private-endpoint#az-network-private-endpoint-create) to create a private link endpoint for the Azure AI. +Use the [Azure networking CLI commands](/cli/azure/network/private-endpoint#az-network-private-endpoint-create) to create a private link endpoint for the Azure AI hub. ```azurecli-interactive az network private-endpoint create \ az network private-endpoint dns-zone-group add \ --zone-name 'privatelink.notebooks.azure.net' ``` -# [Azure portal](#tab/azure-portal) --1. From the [Azure portal](https://portal.azure.com), select your Azure AI. -1. From the left side of the page, select __Networking__ and then select the __Private endpoint connections__ tab. -1. When selecting the __Region__, select the same region as your virtual network. -1. When selecting __Resource type__, use azuremlworkspace. -1. Set the __Resource__ to your workspace name. --Finally, select __Create__ to create the private endpoint. - ## Remove a private endpoint -You can remove one or all private endpoints for an Azure AI. Removing a private endpoint removes the Azure AI from the VNet that the endpoint was associated with. Removing the private endpoint might prevent the Azure AI from accessing resources in that VNet, or resources in the VNet from accessing the workspace. For example, if the VNet doesn't allow access to or from the public internet. +You can remove one or all private endpoints for an Azure AI hub. Removing a private endpoint removes the Azure AI hub from the Azure Virtual Network that the endpoint was associated with. Removing the private endpoint might prevent the Azure AI hub from accessing resources in that virtual network, or resources in the virtual network from accessing the workspace. For example, if the virtual network doesn't allow access to or from the public internet. > [!WARNING]-> Removing the private endpoints for a workspace __doesn't make it publicly accessible__. To make the workspace publicly accessible, use the steps in the [Enable public access](#enable-public-access) section. +> Removing the private endpoints for an AI hub __doesn't make it publicly accessible__. To make the AI hub publicly accessible, use the steps in the [Enable public access](#enable-public-access) section. To remove a private endpoint, use the following information: +# [Azure portal](#tab/azure-portal) ++1. From the [Azure portal](https://portal.azure.com), select your Azure AI hub. +1. From the left side of the page, select __Networking__ and then select the __Private endpoint connections__ tab. +1. Select the endpoint to remove and then select __Remove__. + # [Azure CLI](#tab/cli) When using the Azure CLI, use the following command to remove the private endpoint: az network private-endpoint delete \ --resource-group <resource-group-name> \ ``` -# [Azure portal](#tab/azure-portal) --1. From the [Azure portal](https://portal.azure.com), select your Azure AI. -1. From the left side of the page, select __Networking__ and then select the __Private endpoint connections__ tab. -1. Select the endpoint to remove and then select __Remove__. - ## Enable public access -In some situations, you might want to allow someone to connect to your secured Azure AI over a public endpoint, instead of through the VNet. Or you might want to remove the workspace from the VNet and re-enable public access. +In some situations, you might want to allow someone to connect to your secured Azure AI hub over a public endpoint, instead of through the virtual network. Or you might want to remove the workspace from the virtual network and re-enable public access. > [!IMPORTANT]-> Enabling public access doesn't remove any private endpoints that exist. All communications between components behind the VNet that the private endpoint(s) connect to are still secured. It enables public access only to the Azure AI, in addition to the private access through any private endpoints. +> Enabling public access doesn't remove any private endpoints that exist. All communications between components behind the virtual network that the private endpoint(s) connect to are still secured. It enables public access only to the Azure AI hub, in addition to the private access through any private endpoints. To enable public access, use the following steps: -# [Azure CLI](#tab/cli) --Not available in AI CLI, but you can use [Azure Machine Learning CLI](../../machine-learning/how-to-configure-private-link.md#enable-public-access). Use your Azure AI name as workspace name in Azure Machine Learning CLI. - # [Azure portal](#tab/azure-portal) -1. From the [Azure portal](https://portal.azure.com), select your Azure AI. +1. From the [Azure portal](https://portal.azure.com), select your Azure AI hub. 1. From the left side of the page, select __Networking__ and then select the __Public access__ tab. 1. Select __Enabled from all networks__, and then select __Save__. +# [Azure CLI](#tab/cli) ++Not available in AI CLI, but you can use [Azure Machine Learning CLI](../../machine-learning/how-to-configure-private-link.md#enable-public-access). Use your Azure AI hub name as workspace name in Azure Machine Learning CLI. + ## Managed identity configuration -This is required if you make your storage account private. Our services need to read/write data in your private storage account using [Allow Azure services on the trusted services list to access this storage account](../../storage/common/storage-network-security.md#grant-access-to-trusted-azure-services) with below managed identity configurations. Enable system assigned managed identity of Azure AI Service and Azure AI Search, configure role-based access control for each managed identity. +A manged identity configuration is required if you make your storage account private. Our services need to read/write data in your private storage account using [Allow Azure services on the trusted services list to access this storage account](../../storage/common/storage-network-security.md#grant-access-to-trusted-azure-services) with following managed identity configurations. Enable the system assigned managed identity of Azure AI Service and Azure AI Search, then configure role-based access control for each managed identity. | Role | Managed Identity | Resource | Purpose | Reference | |--|--|--|--|--|-| `Storage File Data Privileged Contributor` | Azure AI project | Storage Account | Read/Write prompt flow data. | [Prompt flow doc](../../machine-learning/prompt-flow/how-to-secure-prompt-flow.md#secure-prompt-flow-with-workspace-managed-virtual-network) | +| `Storage File Data Privileged Contributor` | Azure AI project | Storage Account | Read/Write prompt flow data. | [Prompt flow doc](../../machine-learning/prompt-flow/how-to-secure-prompt-flow.md#secure-prompt-flow-with-workspace-managed-virtual-network) | | `Storage Blob Data Contributor` | Azure AI Service | Storage Account | Read from input container, write to preprocess result to output container. | [Azure OpenAI Doc](../../ai-services/openai/how-to/managed-identity.md) |-| `Storage Blob Data Contributor` | Azure AI Search | Storage Account | Read blob and write knowledge store | [Search doc](../../search/search-howto-managed-identities-data-sources.md)| +| `Storage Blob Data Contributor` | Azure AI Search | Storage Account | Read blob and write knowledge store | [Search doc](../../search/search-howto-managed-identities-data-sources.md). | ## Custom DNS configuration -See [Azure Machine Learning custom dns doc](../../machine-learning/how-to-custom-dns.md#example-custom-dns-server-hosted-in-vnet) for the DNS forwarding configurations. +See [Azure Machine Learning custom DNS](../../machine-learning/how-to-custom-dns.md#example-custom-dns-server-hosted-in-vnet) article for the DNS forwarding configurations. -If you need to configure custom dns server without dns forwarding, the following is the required A records. +If you need to configure custom DNS server without DNS forwarding, use the following patterns for the required A records. * `<AI-STUDIO-GUID>.workspace.<region>.cert.api.azureml.ms` * `<AI-PROJECT-GUID>.workspace.<region>.cert.api.azureml.ms` If you need to configure custom dns server without dns forwarding, the following * `<managed online endpoint name>.<region>.inference.ml.azure.com` - Used by managed online endpoints -See [this documentation](../../machine-learning/how-to-custom-dns.md#find-the-ip-addresses) to check your private IP addresses for your A records. To check AI-PROJECT-GUID, go to Azure portal > Your Azure AI Project > JSON View > workspaceId. +To find the private IP addresses for your A records, see the [Azure Machine Learning custom DNS](../../machine-learning/how-to-custom-dns.md#find-the-ip-addresses) article. +To check AI-PROJECT-GUID, go to the Azure portal, select your Azure AI project, settings, properties, and the workspace ID is displayed. ## Limitations -* Private Azure AI services and Azure AI Search aren't supported. +* Private Azure AI Services and Azure AI Search aren't supported. * The "Add your data" feature in the Azure AI Studio playground doesn't support private storage account.-* You might encounter problems trying to access the private endpoint for your Azure AI if you're using Mozilla Firefox. This problem might be related to DNS over HTTPS in Mozilla Firefox. We recommend using Microsoft Edge or Google Chrome. +* You might encounter problems trying to access the private endpoint for your Azure AI hub if you're using Mozilla Firefox. This problem might be related to DNS over HTTPS in Mozilla Firefox. We recommend using Microsoft Edge or Google Chrome. ## Next steps -- [Create a project](create-projects.md)+- [Create an Azure AI project](create-projects.md) - [Learn more about Azure AI Studio](../what-is-ai-studio.md) - [Learn more about Azure AI hub resources](../concepts/ai-resources.md) - [Troubleshoot secure connectivity to a project](troubleshoot-secure-connection-project.md) |
ai-studio | Create Manage Compute | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/create-manage-compute.md | To create a compute instance in Azure AI Studio: - **Assign to another user**: You can create a compute instance on behalf of another user. Note that a compute instance can't be shared. It can only be used by a single assigned user. By default, it will be assigned to the creator and you can change this to a different user. - **Assign a managed identity**: You can attach system assigned or user assigned managed identities to grant access to resources. The name of the created system managed identity will be in the format `/workspace-name/computes/compute-instance-name` in your Microsoft Entra ID. - **Enable SSH access**: Enter credentials for an administrator user account that will be created on each compute node. These can be used to SSH to the compute nodes.-Note that disabling SSH prevents SSH access from the public internet. When a private virtual network is used, users can still SSH from within the virtual network. 1. On the **Applications** page you can add custom applications to use on your compute instance, such as RStudio or Posit Workbench. Then select **Next**. 1. On the **Tags** page you can add additional information to categorize the resources you create. Then select **Review + Create** or **Next** to review your settings. |
ai-studio | Develop In Vscode | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/develop-in-vscode.md | |
ai-studio | Generate Data Qa | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/generate-data-qa.md | In this article, you learn how to get question and answer pairs from your source ## Install the Synthetics Package ```shell-python --version # ensure you've >=3.8 +python --version # use version 3.8 or later pip3 install azure-identity azure-ai-generative pip3 install wikipedia langchain nltk unstructured ``` |
ai-studio | Index Add | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/index-add.md | You must have: - An Azure AI project - An Azure AI Search resource -## Create an index +## Create an index from the Indexes tab 1. Sign in to [Azure AI Studio](https://ai.azure.com). 1. Go to your project or [create a new project](../how-to/create-projects.md) in Azure AI Studio. You must have: :::image type="content" source="../media/index-retrieve/project-left-menu.png" alt-text="Screenshot of Project Left Menu." lightbox="../media/index-retrieve/project-left-menu.png"::: 1. Select **+ New index**-1. Choose your **Source data**. You can choose source data from a list of your recent data sources, a storage URL on the cloud or even upload files and folders from the local machine. You can also add a connection to another data source such as Azure Blob Storage. +1. Choose your **Source data**. You can choose source data from a list of your recent data sources, a storage URL on the cloud, or upload files and folders from the local machine. You can also add a connection to another data source such as Azure Blob Storage. :::image type="content" source="../media/index-retrieve/select-source-data.png" alt-text="Screenshot of select source data." lightbox="../media/index-retrieve/select-source-data.png"::: You must have: 1. Select **Next** after choosing index storage 1. Configure your **Search Settings**- 1. The search type defaults to **Hybrid + Semantic**, which is a combination of keyword search, vector search and semantic search to give the best possible search results. - 1. For the hybrid option to work, you need an embedding model. Choose the Azure OpenAI resource, which has the embedding model + 1. The ***Vector settings*** defaults to true for Add vector search to this search resource. As noted, this enables Hybrid and Hybrid + Semantic search options. Disabling this limits vector search options to Keyword and Semantic. + 1. For the hybrid option to work, you need an embedding model. Choose an embedding model from the dropdown. 1. Select the acknowledgment to deploy an embedding model if it doesn't already exist in your resource- + :::image type="content" source="../media/index-retrieve/search-settings.png" alt-text="Screenshot of configure search settings." lightbox="../media/index-retrieve/search-settings.png":::+ + If a non-Azure OpenAI model isn't appearing in the dropdown follow these steps: + 1. Navigate to the Project settings in [Azure AI Studio](https://ai.azure.com). + 1. Navigate to connections section in the settings tab and select New connection. + 1. Select **Serverless Model**. + 1. Type in the name of your embedding model deployment and select Add connection. If the model doesn't appear in the dropdown, select the **Enter manually** option. + 1. Enter the deployment API endpoint, model name, and API key in the corresponding fields. Then add connection. + 1. The embedding model should now appear in the dropdown. + + :::image type="content" source="../media/index-retrieve/serverless-connection.png" alt-text="Screenshot of connect a serverless model." lightbox="../media/index-retrieve/serverless-connection.png"::: -1. Use the prefilled name or type your own name for New Vector index name 1. Select **Next** after configuring search settings 1. In the **Index settings** 1. Enter a name for your index or use the autopopulated name+ 1. Schedule updates. You can choose to update the index hourly or daily. 1. Choose the compute where you want to run the jobs to create the index. You can - Auto select to allow Azure AI to choose an appropriate VM size that is available - Choose a VM size from a list of recommended options You must have: 1. Select **Next** after configuring index settings 1. Review the details you entered and select **Create**- - > [!NOTE] - > If you see a **DeploymentNotFound** error, you need to assign more permissions. See [mitigate DeploymentNotFound error](#mitigate-deploymentnotfound-error) for more details. - 1. You're taken to the index details page where you can see the status of your index creation. +## Create an index from the Playground +1. Open your AI Studio project. +1. Navigate to the Playground tab. +1. The Select available project index is displayed for existing indexes in the project. If an existing index isn't being used, continue to the next steps. +1. Select the Add your data dropdown. + + :::image type="content" source="../media/index-retrieve/add-data-dropdown.png" alt-text="Screenshot of the playground add your data dropdown." lightbox="../media/index-retrieve/add-data-dropdown.png"::: -### Mitigate DeploymentNotFound error --When you try to create a vector index, you might see the following error at the **Review + Finish** step: --**Failed to create vector index. DeploymentNotFound: A valid deployment for the model=text-embedding-ada-002 was not found in the workspace connection=Default_AzureOpenAI provided.** --This can happen if you are trying to create an index using an **Owner**, **Contributor**, or **Azure AI Developer** role at the project level. To mitigate this error, you might need to assign more permissions using either of the following methods. --> [!NOTE] -> You need to be assigned the **Owner** role of the resource group or higher scope (like Subscription) to perform the operation in the next steps. This is because only the Owner role can assign roles to others. See details [here](/azure/role-based-access-control/built-in-roles). --#### Method 1: Assign more permissions to the user on the Azure AI hub resource --If the Azure AI hub resource the project uses was created through Azure AI Studio: -1. Sign in to [Azure AI Studio](https://aka.ms/azureaistudio) and select your project via **Build** > **Projects**. -1. Select **AI project settings** from the collapsible left menu. -1. From the **Resource Configuration** section, select the link for your resource group name that takes you to the Azure portal. -1. In the Azure portal under **Overview** > **Resources** select the Azure AI service type. It's named similar to "YourAzureAIResourceName-aiservices." -- :::image type="content" source="../media/roles-access/resource-group-azure-ai-service.png" alt-text="Screenshot of Azure AI service in a resource group." lightbox="../media/roles-access/resource-group-azure-ai-service.png"::: --1. Select **Access control (IAM)** > **+ Add** to add a role assignment. -1. Add the **Cognitive Services OpenAI User** role to the user who wants to make an index. `Cognitive Services OpenAI Contributor` and `Cognitive Services Contributor` also work, but they assign more permissions than needed for creating an index in Azure AI Studio. --> [!NOTE] -> You can also opt to assign more permissions [on the resource group](#method-2-assign-more-permissions-on-the-resource-group). However, that method assigns more permissions than needed to mitigate the **DeploymentNotFound** error. --#### Method 2: Assign more permissions on the resource group +1. If a new index is being created, select the ***Add your data*** option. Then follow the steps from ***Create an index from the Indexes tab*** to navigate through the wizard to create an index. + 1. If there's an external index that is being used, select the ***Connect external index*** option. + 1. In the **Index Source** + 1. Select your data source + 1. Select your AI Search Service + 1. Select the index to be used. -If the Azure AI hub resource the project uses was created through Azure portal: -1. Sign in to [Azure AI Studio](https://aka.ms/azureaistudio) and select your project via **Build** > **Projects**. -1. Select **AI project settings** from the collapsible left menu. -1. From the **Resource Configuration** section, select the link for your resource group name that takes you to the Azure portal. -1. Select **Access control (IAM)** > **+ Add** to add a role assignment. -1. Add the **Cognitive Services OpenAI User** role to the user who wants to make an index. `Cognitive Services OpenAI Contributor` and `Cognitive Services Contributor` also work, but they assign more permissions than needed for creating an index in Azure AI Studio. + :::image type="content" source="../media/index-retrieve/connect-external-index.png" alt-text="Screenshot of the page where you select an index." lightbox="../media/index-retrieve/connect-external-index.png"::: + + 1. Select **Next** after configuring search settings. + 1. In the **Index settings** + 1. Enter a name for your index or use the autopopulated name + 1. Schedule updates. You can choose to update the index hourly or daily. + 1. Choose the compute where you want to run the jobs to create the index. You can + - Auto select to allow Azure AI to choose an appropriate VM size that is available + - Choose a VM size from a list of recommended options + - Choose a VM size from a list of all possible options + 1. Review the details you entered and select **Create.** + 1. The index is now ready to be used in the Playground. ## Use an index in prompt flow If the Azure AI hub resource the project uses was created through Azure portal: 1. Provide a name for your Index Lookup Tool and select **Add**. 1. Select the **mlindex_content** value box, and select your index. After completing this step, enter the queries and **query_types** to be performed against the index. - :::image type="content" source="../media/index-retrieve/configure-index-lookup-tool.png" alt-text="Screenshot of Configure Index Lookup." lightbox="../media/index-retrieve/configure-index-lookup-tool.png"::: + :::image type="content" source="../media/index-retrieve/configure-index-lookup-tool.png" alt-text="Screenshot of the prompt flow node to configure index lookup." lightbox="../media/index-retrieve/configure-index-lookup-tool.png"::: + ## Next steps -- [Learn more about RAG](../concepts/retrieval-augmented-generation.md)+- [Learn more about RAG](../concepts/retrieval-augmented-generation.md) |
ai-studio | Azure Open Ai Gpt 4V Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/azure-open-ai-gpt-4v-tool.md | Title: Azure OpenAI GPT-4 Turbo with Vision tool in Azure AI Studio -description: This article introduces the Azure OpenAI GPT-4 Turbo with Vision tool for flows in Azure AI Studio. +description: This article introduces you to the Azure OpenAI GPT-4 Turbo with Vision tool for flows in Azure AI Studio. Last updated 2/26/2024 - # Azure OpenAI GPT-4 Turbo with Vision tool in Azure AI Studio [!INCLUDE [Azure AI Studio preview](../../includes/preview-ai-studio.md)] -The prompt flow *Azure OpenAI GPT-4 Turbo with Vision* tool enables you to use your Azure OpenAI GPT-4 Turbo with Vision model deployment to analyze images and provide textual responses to questions about them. +The prompt flow Azure OpenAI GPT-4 Turbo with Vision tool enables you to use your Azure OpenAI GPT-4 Turbo with Vision model deployment to analyze images and provide textual responses to questions about them. ## Prerequisites -- An Azure subscription - <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">Create one for free</a>.+- An Azure subscription. <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">You can create one for free</a>. - Access granted to Azure OpenAI in the desired Azure subscription. - Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at <a href="https://aka.ms/oai/access" target="_blank">https://aka.ms/oai/access</a>. Open an issue on this repo to contact us if you have an issue. + Currently, you must apply for access to this service. To apply for access to Azure OpenAI, complete the form at <a href="https://aka.ms/oai/access" target="_blank">https://aka.ms/oai/access</a>. Open an issue on this repo to contact us if you have an issue. -- An [Azure AI hub resource](../../how-to/create-azure-ai-resource.md) with a GPT-4 Turbo with Vision model deployed in one of the regions that support GPT-4 Turbo with Vision: Australia East, Switzerland North, Sweden Central, and West US. When you deploy from your project's **Deployments** page, select: `gpt-4` as the model name and `vision-preview` as the model version.+- An [Azure AI hub resource](../../how-to/create-azure-ai-resource.md) with a GPT-4 Turbo with Vision model deployed in [one of the regions that support GPT-4 Turbo with Vision](../../../ai-services/openai/concepts/models.md#model-summary-table-and-region-availability). When you deploy from your project's **Deployments** page, select `gpt-4` as the model name and `vision-preview` as the model version. ## Build with the Azure OpenAI GPT-4 Turbo with Vision tool 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ More tools** > **Azure OpenAI GPT-4 Turbo with Vision** to add the Azure OpenAI GPT-4 Turbo with Vision tool to your flow. - :::image type="content" source="../../media/prompt-flow/azure-openai-gpt-4-vision-tool.png" alt-text="Screenshot of the Azure OpenAI GPT-4 Turbo with Vision tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/azure-openai-gpt-4-vision-tool.png"::: + :::image type="content" source="../../media/prompt-flow/azure-openai-gpt-4-vision-tool.png" alt-text="Screenshot that shows the Azure OpenAI GPT-4 Turbo with Vision tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/azure-openai-gpt-4-vision-tool.png"::: 1. Select the connection to your Azure OpenAI Service. For example, you can select the **Default_AzureOpenAI** connection. For more information, see [Prerequisites](#prerequisites).-1. Enter values for the Azure OpenAI GPT-4 Turbo with Vision tool input parameters described [here](#inputs). For example, you can use this example prompt: +1. Enter values for the Azure OpenAI GPT-4 Turbo with Vision tool input parameters described in the [Inputs table](#inputs). For example, you can use this example prompt: ```jinja # system: The prompt flow *Azure OpenAI GPT-4 Turbo with Vision* tool enables you to use y ``` 1. Select **Validate and parse input** to validate the tool inputs.-1. Specify an image to analyze in the `image_input` input parameter. For example, you can upload an image or enter the URL of an image to analyze. Otherwise you can paste or drag and drop an image into the tool. -1. Add more tools to your flow as needed, or select **Run** to run the flow. -1. The outputs are described [here](#outputs). +1. Specify an image to analyze in the `image_input` input parameter. For example, you can upload an image or enter the URL of an image to analyze. Otherwise, you can paste or drag and drop an image into the tool. +1. Add more tools to your flow, as needed. Or select **Run** to run the flow. ++The outputs are described in the [Outputs table](#outputs). Here's an example output response: Here's an example output response: ## Inputs -The following are available input parameters: +The following input parameters are available. | Name | Type | Description | Required | | - | - | -- | -- | | connection | AzureOpenAI | The Azure OpenAI connection to be used in the tool. | Yes | | deployment\_name | string | The language model to use. | Yes |-| prompt | string | Text prompt that the language model uses to generate its response. The Jinja template for composing prompts in this tool follows a similar structure to the chat API in the LLM tool. To represent an image input within your prompt, you can use the syntax `![image]({{INPUT NAME}})`. Image input can be passed in the `user`, `system` and `assistant` messages. | Yes | -| max\_tokens | integer | Maximum number of tokens to generate in the response. Default is 512. | No | -| temperature | float | Randomness of the generated text. Default is 1. | No | -| stop | list | Stopping sequence for the generated text. Default is null. | No | -| top_p | float | Probability of using the top choice from the generated tokens. Default is 1. | No | -| presence\_penalty | float | Value that controls the model's behavior regarding repeating phrases. Default is 0. | No | -| frequency\_penalty | float | Value that controls the model's behavior regarding generating rare phrases. Default is 0. | No | +| prompt | string | The text prompt that the language model uses to generate its response. The Jinja template for composing prompts in this tool follows a similar structure to the chat API in the large language model (LLM) tool. To represent an image input within your prompt, you can use the syntax `![image]({{INPUT NAME}})`. Image input can be passed in the `user`, `system`, and `assistant` messages. | Yes | +| max\_tokens | integer | The maximum number of tokens to generate in the response. Default is 512. | No | +| temperature | float | The randomness of the generated text. Default is 1. | No | +| stop | list | The stopping sequence for the generated text. Default is null. | No | +| top_p | float | The probability of using the top choice from the generated tokens. Default is 1. | No | +| presence\_penalty | float | The value that controls the model's behavior regarding repeating phrases. Default is 0. | No | +| frequency\_penalty | float | The value that controls the model's behavior regarding generating rare phrases. Default is 0. | No | ## Outputs -The following are available output parameters: +The following output parameters are available. -| Return Type | Description | +| Return type | Description | |-|| | string | The text of one response of conversation | -## Next step +## Next steps - Learn more about [how to process images in prompt flow](../flow-process-image.md).-- [Learn more about how to create a flow](../flow-develop.md).+- Learn more about [how to create a flow](../flow-develop.md). |
ai-studio | Content Safety Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/content-safety-tool.md | Title: Content Safety tool for flows in Azure AI Studio -description: This article introduces the Content Safety tool for flows in Azure AI Studio. +description: This article introduces you to the Content Safety tool for flows in Azure AI Studio. -The prompt flow *Content Safety* tool enables you to use Azure AI Content Safety in Azure AI Studio. +The prompt flow Content Safety tool enables you to use Azure AI Content Safety in Azure AI Studio. Azure AI Content Safety is a content moderation service that helps detect harmful content from different modalities and languages. For more information, see [Azure AI Content Safety](/azure/ai-services/content-safety/). ## Prerequisites -Create an Azure Content Safety connection: +To create an Azure Content Safety connection: + 1. Sign in to [Azure AI Studio](https://studio.azureml.net/). 1. Go to **AI project settings** > **Connections**. 1. Select **+ New connection**.-1. Complete all steps in the **Create a new connection** dialog box. You can use an Azure AI hub resource or Azure AI Content Safety resource. An Azure AI hub resource that supports multiple Azure AI services is recommended. +1. Complete all steps in the **Create a new connection** dialog. You can use an Azure AI hub resource or Azure AI Content Safety resource. We recommend that you use an Azure AI hub resource that supports multiple Azure AI services. ## Build with the Content Safety tool 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ More tools** > **Content Safety (Text)** to add the Content Safety tool to your flow. - :::image type="content" source="../../media/prompt-flow/content-safety-tool.png" alt-text="Screenshot of the Content Safety tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/content-safety-tool.png"::: + :::image type="content" source="../../media/prompt-flow/content-safety-tool.png" alt-text="Screenshot that shows the Content Safety tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/content-safety-tool.png"::: 1. Select the connection to one of your provisioned resources. For example, select **AzureAIContentSafetyConnection** if you created a connection with that name. For more information, see [Prerequisites](#prerequisites).-1. Enter values for the Content Safety tool input parameters described [here](#inputs). -1. Add more tools to your flow as needed, or select **Run** to run the flow. -1. The outputs are described [here](#outputs). +1. Enter values for the Content Safety tool input parameters described in the [Inputs table](#inputs). +1. Add more tools to your flow, as needed. Or select **Run** to run the flow. +1. The outputs are described in the [Outputs table](#outputs). ## Inputs -The following are available input parameters: +The following input parameters are available. | Name | Type | Description | Required | | - | - | -- | -- | | text | string | The text that needs to be moderated. | Yes |-| hate_category | string | The moderation sensitivity for Hate category. You can choose from four options: *disable*, *low_sensitivity*, *medium_sensitivity*, or *high_sensitivity*. The *disable* option means no moderation for hate category. The other three options mean different degrees of strictness in filtering out hate content. The default option is *medium_sensitivity*. | Yes | -| sexual_category | string | The moderation sensitivity for Sexual category. You can choose from four options: *disable*, *low_sensitivity*, *medium_sensitivity*, or *high_sensitivity*. The *disable* option means no moderation for sexual category. The other three options mean different degrees of strictness in filtering out sexual content. The default option is *medium_sensitivity*. | Yes | -| self_harm_category | string | The moderation sensitivity for Self-harm category. You can choose from four options: *disable*, *low_sensitivity*, *medium_sensitivity*, or *high_sensitivity*. The *disable* option means no moderation for self-harm category. The other three options mean different degrees of strictness in filtering out self_harm content. The default option is *medium_sensitivity*. | Yes | -| violence_category | string | The moderation sensitivity for Violence category. You can choose from four options: *disable*, *low_sensitivity*, *medium_sensitivity*, or *high_sensitivity*. The *disable* option means no moderation for violence category. The other three options mean different degrees of strictness in filtering out violence content. The default option is *medium_sensitivity*. | Yes | +| hate_category | string | The moderation sensitivity for the Hate category. You can choose from four options: `disable`, `low_sensitivity`, `medium_sensitivity`, or `high_sensitivity`. The `disable` option means no moderation for the Hate category. The other three options mean different degrees of strictness in filtering out hate content. The default option is `medium_sensitivity`. | Yes | +| sexual_category | string | The moderation sensitivity for the Sexual category. You can choose from four options: `disable`, `low_sensitivity`, `medium_sensitivity`, or `high_sensitivity`. The `disable` option means no moderation for the Sexual category. The other three options mean different degrees of strictness in filtering out sexual content. The default option is `medium_sensitivity`. | Yes | +| self_harm_category | string | The moderation sensitivity for the Self-harm category. You can choose from four options: `disable`, `low_sensitivity`, `medium_sensitivity`, or `high_sensitivity`. The `disable` option means no moderation for the Self-harm category. The other three options mean different degrees of strictness in filtering out self-harm content. The default option is `medium_sensitivity`. | Yes | +| violence_category | string | The moderation sensitivity for the Violence category. You can choose from four options: `disable`, `low_sensitivity`, `medium_sensitivity`, or `high_sensitivity`. The `disable` option means no moderation for the Violence category. The other three options mean different degrees of strictness in filtering out violence content. The default option is `medium_sensitivity`. | Yes | ## Outputs The following JSON format response is an example returned by the tool: } ``` -You can use the following parameters as inputs for this tool: +You can use the following parameters as inputs for this tool. | Name | Type | Description | | - | - | -- | -| action_by_category | string | A binary value for each category: *Accept* or *Reject*. This value shows if the text meets the sensitivity level that you set in the request parameters for that category. | -| suggested_action | string | An overall recommendation based on the four categories. If any category has a *Reject* value, the `suggested_action` is *Reject* as well. | +| action_by_category | string | A binary value for each category: `Accept` or `Reject`. This value shows if the text meets the sensitivity level that you set in the request parameters for that category. | +| suggested_action | string | An overall recommendation based on the four categories. If any category has a `Reject` value, `suggested_action` is also `Reject`. | ## Next steps |
ai-studio | Embedding Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/embedding-tool.md | Title: Embedding tool for flows in Azure AI Studio -description: This article introduces the Embedding tool for flows in Azure AI Studio. +description: This article introduces you to the Embedding tool for flows in Azure AI Studio. -The prompt flow *Embedding* tool enables you to convert text into dense vector representations for various natural language processing tasks +The prompt flow Embedding tool enables you to convert text into dense vector representations for various natural language processing tasks. > [!NOTE]-> For chat and completion tools, check out the [LLM tool](llm-tool.md). +> For chat and completion tools, learn more about the large language model [(LLM) tool](llm-tool.md). ## Build with the Embedding tool 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ More tools** > **Embedding** to add the Embedding tool to your flow. - :::image type="content" source="../../media/prompt-flow/embedding-tool.png" alt-text="Screenshot of the Embedding tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/embedding-tool.png"::: + :::image type="content" source="../../media/prompt-flow/embedding-tool.png" alt-text="Screenshot that shows the Embedding tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/embedding-tool.png"::: 1. Select the connection to one of your provisioned resources. For example, select **Default_AzureOpenAI**.-1. Enter values for the Embedding tool input parameters described [here](#inputs). -1. Add more tools to your flow as needed, or select **Run** to run the flow. -1. The outputs are described [here](#outputs). -+1. Enter values for the Embedding tool input parameters described in the [Inputs table](#inputs). +1. Add more tools to your flow, as needed. Or select **Run** to run the flow. +1. The outputs are described in the [Outputs table](#outputs). ## Inputs -The following are available input parameters: +The following input parameters are available. | Name | Type | Description | Required | ||-|--|-|-| input | string | the input text to embed | Yes | -| model, deployment_name | string | instance of the text-embedding engine to use | Yes | +| input | string | The input text to embed. | Yes | +| model, deployment_name | string | The instance of the text-embedding engine to use. | Yes | ## Outputs The output is a list of vector representations for the input text. For example: ## Next steps -- [Learn more about how to create a flow](../flow-develop.md)-+- [Learn more about how to create a flow](../flow-develop.md) |
ai-studio | Faiss Index Lookup Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/faiss-index-lookup-tool.md | -> Vector, Vector DB and Faiss Index Lookup tools are deprecated and will be retired soon. [Migrated to the new Index Lookup tool (preview).](index-lookup-tool.md#how-to-migrate-from-legacy-tools-to-the-index-lookup-tool) +> Vector, Vector DB and Faiss Index Lookup tools are deprecated and will be retired soon. [Migrated to the new Index Lookup tool (preview).](index-lookup-tool.md#migrate-from-legacy-tools-to-the-index-lookup-tool) The prompt flow *Faiss Index Lookup* tool is tailored for querying within a user-provided Faiss-based vector store. In combination with the [Large Language Model (LLM) tool](llm-tool.md), it can help to extract contextually relevant information from a domain knowledge base. |
ai-studio | Index Lookup Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/index-lookup-tool.md | Title: Index Lookup tool for flows in Azure AI Studio -description: This article introduces the Index Lookup tool for flows in Azure AI Studio. +description: This article introduces you to the Index Lookup tool for flows in Azure AI Studio. -The prompt flow *Index Lookup* tool enables the usage of common vector indices (such as Azure AI Search, FAISS, and Pinecone) for retrieval augmented generation (RAG) in prompt flow. The tool automatically detects the indices in the workspace and allows the selection of the index to be used in the flow. +The prompt flow Index Lookup tool enables the use of common vector indices (such as Azure AI Search, Faiss, and Pinecone) for retrieval augmented generation in prompt flow. The tool automatically detects the indices in the workspace and allows the selection of the index to be used in the flow. ## Build with the Index Lookup tool 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ More tools** > **Index Lookup** to add the Index Lookup tool to your flow. - :::image type="content" source="../../media/prompt-flow/configure-index-lookup-tool.png" alt-text="Screenshot of the Index Lookup tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/configure-index-lookup-tool.png"::: --1. Enter values for the Index Lookup tool [input parameters](#inputs). The [LLM tool](llm-tool.md) can generate the vector input. -1. Add more tools to your flow as needed, or select **Run** to run the flow. -1. To learn more about the returned output, see [outputs](#outputs). + :::image type="content" source="../../media/prompt-flow/configure-index-lookup-tool.png" alt-text="Screenshot that shows the Index Lookup tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/configure-index-lookup-tool.png"::: +1. Enter values for the Index Lookup tool [input parameters](#inputs). The large language model [(LLM) tool](llm-tool.md) can generate the vector input. +1. Add more tools to your flow, as needed. Or select **Run** to run the flow. +1. To learn more about the returned output, see the [Outputs table](#outputs). ## Inputs -The following are available input parameters: +The following input parameters are available. | Name | Type | Description | Required | | - | - | -- | -- |-| mlindex_content | string | Type of index to be used. Input depends on the index type. An example of an Azure AI Search index JSON can be seen below the table. | Yes | +| mlindex_content | string | The type of index to be used. Input depends on the index type. An example of an Azure AI Search index JSON can be seen underneath the table. | Yes | | queries | string, `Union[string, List[String]]` | The text to be queried.| Yes | |query_type | string | The type of query to be performed. Options include Keyword, Semantic, Hybrid, and others. | Yes | | top_k | integer | The count of top-scored entities to return. Default value is 3. | No | -Here's an example of an Azure AI Search index input. +Here's an example of an Azure AI Search index input: ```json embeddings: index: ## Outputs -The following JSON format response is an example returned by the tool that includes the top-k scored entities. The entity follows a generic schema of vector search result provided by the `promptflow-vectordb` SDK. For the Vector Index Search, the following fields are populated: +The following JSON format response is an example returned by the tool that includes the top-k scored entities. The entity follows a generic schema of vector search results provided by the `promptflow-vectordb` SDK. For the Vector Index Search, the following fields are populated: -| Field Name | Type | Description | +| Field name | Type | Description | | - | - | -- |-| metadata | dict | Customized key-value pairs provided by user when creating the index | -| page_content | string | Content of the vector chunk being used in the lookup | -| score | float | Depends on index type defined in Vector Index. If index type is Faiss, score is L2 distance. If index type is Azure AI Search, score is cosine similarity. | -+| metadata | dict | The customized key-value pairs provided by the user when creating the index. | +| page_content | string | The content of the vector chunk being used in the lookup. | +| score | float | Depends on the index type defined in the Vector Index. If the index type is Faiss, the score is L2 distance. If the index type is Azure AI Search, the score is cosine similarity. | - ```json [ { The following JSON format response is an example returned by the tool that inclu ``` +## Migrate from legacy tools to the Index Lookup tool -## How to migrate from legacy tools to the Index Lookup tool -The Index Lookup tool looks to replace the three deprecated legacy index tools, the [Vector Index Lookup tool](./vector-index-lookup-tool.md), the [Vector DB Lookup tool](./vector-db-lookup-tool.md) and the [Faiss Index Lookup tool](./faiss-index-lookup-tool.md). -If you have a flow that contains one of these tools, follow the steps below to upgrade your flow. +The Index Lookup tool looks to replace the three deprecated legacy index tools: the [Vector Index Lookup tool](./vector-index-lookup-tool.md), the [Vector DB Lookup tool](./vector-db-lookup-tool.md), and the [Faiss Index Lookup tool](./faiss-index-lookup-tool.md). +If you have a flow that contains one of these tools, follow the next steps to upgrade your flow. ### Upgrade your tools -1. Update your runtime. In order to do this navigate to the "AI project settings tab on the left blade in AI Studio. From there you should see a list of Prompt flow runtimes. Select the name of the runtime you want to update, and click on the ΓÇ£UpdateΓÇ¥ button near the top of the panel. Wait for the runtime to update itself. -1. Navigate to your flow. You can do this by clicking on the ΓÇ£Prompt flowΓÇ¥ tab on the left blade in AI Studio, clicking on the ΓÇ£FlowsΓÇ¥ pivot tab, and then clicking on the name of your flow. +1. To update your runtime, go to the AI project **Settings** tab on the left pane in AI Studio. In the list of prompt flow runtimes that appears, select the name of the runtime you want to update. Then select **Update**. Wait for the runtime to update itself. +1. To go to your flow, select the **Prompt flow** tab on the left pane in AI Studio. Select the **Flows** tab, and then select the name of your flow. -1. Once inside the flow, click on the ΓÇ£+ More toolsΓÇ¥ button near the top of the pane. A dropdown should open and click on ΓÇ£Index Lookup [Preview]ΓÇ¥ to add an instance of the Index Lookup tool. +1. Inside the flow, select **+ More tools**. In the dropdown list, select **Index Lookup** [Preview] to add an instance of the Index Lookup tool. - :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/index-dropdown.png" alt-text="Screenshot of the More Tools dropdown in promptflow." lightbox="../../media/prompt-flow/upgrade-index-tools/index-dropdown.png"::: + :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/index-dropdown.png" alt-text="Screenshot that shows the More tools dropdown list in the prompt flow." lightbox="../../media/prompt-flow/upgrade-index-tools/index-dropdown.png"::: -1. Name the new node and click ΓÇ£AddΓÇ¥. +1. Name the new node and select **Add**. - :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/save-node.png" alt-text="Screenshot of the index lookup node with name." lightbox="../../media/prompt-flow/upgrade-index-tools/save-node.png"::: + :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/save-node.png" alt-text="Screenshot that shows the Index Lookup node with a name." lightbox="../../media/prompt-flow/upgrade-index-tools/save-node.png"::: -1. In the new node, click on the ΓÇ£mlindex_contentΓÇ¥ textbox. This should be the first textbox in the list. +1. In the new node, select the **mlindex_content** textbox. It should be the first textbox in the list. - :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/mlindex-box.png" alt-text="Screenshot of the expanded Index Lookup node with the mlindex_content box outlined in red." lightbox="../../media/prompt-flow/upgrade-index-tools/mlindex-box.png"::: + :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/mlindex-box.png" alt-text="Screenshot that shows the expanded Index Lookup node with the mlindex_content textbox." lightbox="../../media/prompt-flow/upgrade-index-tools/mlindex-box.png"::: -1. In the Generate drawer that appears, follow the instructions below to upgrade from the three legacy tools: - - If using the legacy **Vector Index Lookup** tool, select ΓÇ£Registered Index" in the ΓÇ£index_typeΓÇ¥ dropdown. Select your vector index asset from the ΓÇ£mlindex_asset_idΓÇ¥ dropdown. - - If using the legacy **Faiss Index Lookup** tool, select ΓÇ£FaissΓÇ¥ in the ΓÇ£index_typeΓÇ¥ dropdown and specify the same path as in the legacy tool. - - If using the legacy **Vector DB Lookup** tool, select AI Search or Pinecone depending on the DB type in the ΓÇ£index_typeΓÇ¥ dropdown and fill in the information as necessary. -1. After filling in the necessary information, click save. -1. Upon returning to the node, there should be information populated in the ΓÇ£mlindex_contentΓÇ¥ textbox. Click on the ΓÇ£queriesΓÇ¥ textbox next, and select the search terms you want to query. YouΓÇÖll want to select the same value as the input to the ΓÇ£embed_the_questionΓÇ¥ node, typically either ΓÇ£\${inputs.question}ΓÇ¥ or ΓÇ£${modify_query_with_history.output}ΓÇ¥ (the former if youΓÇÖre in a standard flow and the latter if youΓÇÖre in a chat flow). +1. In **Generate**, follow these steps to upgrade from the three legacy tools: + - **Vector Index Lookup**: Select **Registered Index** in the **index_type** dropdown. Select your vector index asset from the **mlindex_asset_id** dropdown list. + - **Faiss Index Lookup**: Select **Faiss** in the **index_type** dropdown list. Specify the same path as in the legacy tool. + - **Vector DB Lookup**: Select AI Search or Pinecone depending on the DB type in the **index_type** dropdown list. Fill in the information, as necessary. +1. Select **Save**. +1. Back in the node, information is now populated in the **mlindex_content** textbox. Select the **queries** textbox and select the search terms you want to query. Select the same value as the input to the **embed_the_question** node. This value is typically either `\${inputs.question}` or `${modify_query_with_history.output}`. Use `\${inputs.question}` if you're in a standard flow. Use `${modify_query_with_history.output}` if you're in a chat flow. - :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/mlindex-with-content.png" alt-text="Screenshot of the expanded Index Lookup node with index information in the cells." lightbox="../../media/prompt-flow/upgrade-index-tools/mlindex-with-content.png"::: + :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/mlindex-with-content.png" alt-text="Screenshot that shows the expanded Index Lookup node with index information in the cells." lightbox="../../media/prompt-flow/upgrade-index-tools/mlindex-with-content.png"::: -1. Select a query type by clicking on the dropdown next to ΓÇ£query_type.ΓÇ¥ ΓÇ£VectorΓÇ¥ will produce identical results as the legacy flow, but depending on your index configuration, other options including "Hybrid" and "Semantic" may be available. +1. Select a query type by selecting the dropdown next to **query_type**. **Vector** produces identical results as the legacy flow. Depending on your index configuration, other options such as **Hybrid** and **Semantic** might be available. - :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/vector-search.png" alt-text="Screenshot of the expanded Index Lookup node with vector search outlined in red." lightbox="../../media/prompt-flow/upgrade-index-tools/vector-search.png"::: + :::image type="content" source="../../media/prompt-flow/upgrade-index-tools/vector-search.png" alt-text="Screenshot that shows the expanded Index Lookup node with Vector search." lightbox="../../media/prompt-flow/upgrade-index-tools/vector-search.png"::: -1. Edit downstream components to consume the output of your newly added node, instead of the output of the legacy Vector Index Lookup node. -1. Delete the Vector Index Lookup node and its parent embedding node. +1. Edit downstream components to consume the output of your newly added node, instead of the output of the legacy Vector Index Lookup node. +1. Delete the Vector Index Lookup node and its parent embedding node. ## Next steps |
ai-studio | Llm Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/llm-tool.md | Title: LLM tool for flows in Azure AI Studio -description: This article introduces the LLM tool for flows in Azure AI Studio. +description: This article introduces you to the large language model (LLM) tool for flows in Azure AI Studio. -The prompt flow *LLM* tool enables you to use large language models (LLM) for natural language processing. +To use large language models (LLMs) for natural language processing, you use the prompt flow LLM tool. > [!NOTE] > For embeddings to convert text into dense vector representations for various natural language processing tasks, see [Embedding tool](embedding-tool.md). ## Prerequisites -Prepare a prompt as described in the [prompt tool](prompt-tool.md#prerequisites) documentation. The LLM tool and Prompt tool both support [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) templates. For more information and best practices, see [prompt engineering techniques](../../../ai-services/openai/concepts/advanced-prompt-engineering.md). +Prepare a prompt as described in the [Prompt tool](prompt-tool.md#prerequisites) documentation. The LLM tool and Prompt tool both support [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) templates. For more information and best practices, see [Prompt engineering techniques](../../../ai-services/openai/concepts/advanced-prompt-engineering.md). ## Build with the LLM tool 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ LLM** to add the LLM tool to your flow. - :::image type="content" source="../../media/prompt-flow/llm-tool.png" alt-text="Screenshot of the LLM tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/llm-tool.png"::: + :::image type="content" source="../../media/prompt-flow/llm-tool.png" alt-text="Screenshot that shows the LLM tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/llm-tool.png"::: 1. Select the connection to one of your provisioned resources. For example, select **Default_AzureOpenAI**.-1. From the **Api** drop-down list, select *chat* or *completion*. -1. Enter values for the LLM tool input parameters described [here](#inputs). If you selected the *chat* API, see [chat inputs](#chat-inputs). If you selected the *completion* API, see [text completion inputs](#text-completion-inputs). For information about how to prepare the prompt input, see [prerequisites](#prerequisites). -1. Add more tools to your flow as needed, or select **Run** to run the flow. -1. The outputs are described [here](#outputs). -+1. From the **Api** dropdown list, select **chat** or **completion**. +1. Enter values for the LLM tool input parameters described in the [Text completion inputs table](#inputs). If you selected the **chat** API, see the [Chat inputs table](#chat-inputs). If you selected the **completion** API, see the [Text completion inputs table](#text-completion-inputs). For information about how to prepare the prompt input, see [Prerequisites](#prerequisites). +1. Add more tools to your flow, as needed. Or select **Run** to run the flow. +1. The outputs are described in the [Outputs table](#outputs). ## Inputs -The following are available input parameters: +The following input parameters are available. ### Text completion inputs | Name | Type | Description | Required | ||-|--|-|-| prompt | string | text prompt for the language model | Yes | -| model, deployment_name | string | the language model to use | Yes | -| max\_tokens | integer | the maximum number of tokens to generate in the completion. Default is 16. | No | -| temperature | float | the randomness of the generated text. Default is 1. | No | -| stop | list | the stopping sequence for the generated text. Default is null. | No | -| suffix | string | text appended to the end of the completion | No | -| top_p | float | the probability of using the top choice from the generated tokens. Default is 1. | No | -| logprobs | integer | the number of log probabilities to generate. Default is null. | No | -| echo | boolean | value that indicates whether to echo back the prompt in the response. Default is false. | No | -| presence\_penalty | float | value that controls the model's behavior regarding repeating phrases. Default is 0. | No | -| frequency\_penalty | float | value that controls the model's behavior regarding generating rare phrases. Default is 0. | No | -| best\_of | integer | the number of best completions to generate. Default is 1. | No | -| logit\_bias | dictionary | the logit bias for the language model. Default is empty dictionary. | No | -+| prompt | string | Text prompt for the language model. | Yes | +| model, deployment_name | string | The language model to use. | Yes | +| max\_tokens | integer | The maximum number of tokens to generate in the completion. Default is 16. | No | +| temperature | float | The randomness of the generated text. Default is 1. | No | +| stop | list | The stopping sequence for the generated text. Default is null. | No | +| suffix | string | The text appended to the end of the completion. | No | +| top_p | float | The probability of using the top choice from the generated tokens. Default is 1. | No | +| logprobs | integer | The number of log probabilities to generate. Default is null. | No | +| echo | boolean | The value that indicates whether to echo back the prompt in the response. Default is false. | No | +| presence\_penalty | float | The value that controls the model's behavior regarding repeating phrases. Default is 0. | No | +| frequency\_penalty | float | The value that controls the model's behavior regarding generating rare phrases. Default is 0. | No | +| best\_of | integer | The number of best completions to generate. Default is 1. | No | +| logit\_bias | dictionary | The logit bias for the language model. Default is empty dictionary. | No | ### Chat inputs | Name | Type | Description | Required | ||-||-|-| prompt | string | text prompt that the language model should reply to | Yes | -| model, deployment_name | string | the language model to use | Yes | -| max\_tokens | integer | the maximum number of tokens to generate in the response. Default is inf. | No | -| temperature | float | the randomness of the generated text. Default is 1. | No | -| stop | list | the stopping sequence for the generated text. Default is null. | No | -| top_p | float | the probability of using the top choice from the generated tokens. Default is 1. | No | -| presence\_penalty | float | value that controls the model's behavior regarding repeating phrases. Default is 0. | No | -| frequency\_penalty | float | value that controls the model's behavior regarding generating rare phrases. Default is 0. | No | -| logit\_bias | dictionary | the logit bias for the language model. Default is empty dictionary. | No | +| prompt | string | The text prompt that the language model should reply to. | Yes | +| model, deployment_name | string | The language model to use. | Yes | +| max\_tokens | integer | The maximum number of tokens to generate in the response. Default is inf. | No | +| temperature | float | The randomness of the generated text. Default is 1. | No | +| stop | list | The stopping sequence for the generated text. Default is null. | No | +| top_p | float | The probability of using the top choice from the generated tokens. Default is 1. | No | +| presence\_penalty | float | The value that controls the model's behavior regarding repeating phrases. Default is 0. | No | +| frequency\_penalty | float | The value that controls the model's behavior regarding generating rare phrases. Default is 0. | No | +| logit\_bias | dictionary | The logit bias for the language model. Default is empty dictionary. | No | ## Outputs The output varies depending on the API you selected for inputs. -| API | Return Type | Description | +| API | Return type | Description | ||-||-| Completion | string | The text of one predicted completion | -| Chat | string | The text of one response of conversation | +| Completion | string | The text of one predicted completion. | +| Chat | string | The text of one response of conversation. | ## Next steps |
ai-studio | Prompt Flow Tools Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/prompt-flow-tools-overview.md | description: Learn about prompt flow tools that are available in Azure AI Studio Previously updated : 2/6/2024 Last updated : 4/5/2024 -The following table provides an index of tools in prompt flow. +The following table provides an index of tools in prompt flow. -| Tool (set) name | Description | Environment | Package name | +| Tool name | Description | Package name | ||--|-|--|-| [LLM](./llm-tool.md) | Use Azure OpenAI large language models (LLM) for tasks such as text completion or chat. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | -| [Prompt](./prompt-tool.md) | Craft a prompt by using Jinja as the templating language. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | -| [Python](./python-tool.md) | Run Python code. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | -| [Azure OpenAI GPT-4 Turbo with Vision](./azure-open-ai-gpt-4v-tool.md) | Use AzureOpenAI GPT-4 Turbo with Vision model deployment to analyze images and provide textual responses to questions about them. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | -| [Content Safety (Text)](./content-safety-tool.md) | Use Azure AI Content Safety to detect harmful content. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | -| [Index Lookup*](./index-lookup-tool.md) | Search an Azure Machine Learning Vector Index for relevant results using one or more text queries. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | -| [Vector Index Lookup*](./vector-index-lookup-tool.md) | Search text or a vector-based query from a vector index. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | -| [Faiss Index Lookup*](./faiss-index-lookup-tool.md) | Search a vector-based query from the Faiss index file. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | -| [Vector DB Lookup*](./vector-db-lookup-tool.md) | Search a vector-based query from an existing vector database. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | -| [Embedding](./embedding-tool.md) | Use Azure OpenAI embedding models to create an embedding vector that represents the input text. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | -| [Serp API](./serp-api-tool.md) | Use Serp API to obtain search results from a specific search engine. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | -| [Azure AI Language tools*](https://microsoft.github.io/promptflow/integrations/tools/azure-ai-language-tool.html) | This collection of tools is a wrapper for various Azure AI Language APIs, which can help effectively understand and analyze documents and conversations. The capabilities currently supported include: Abstractive Summarization, Extractive Summarization, Conversation Summarization, Entity Recognition, Key Phrase Extraction, Language Detection, PII Entity Recognition, Conversational PII, Sentiment Analysis, Conversational Language Understanding, Translator. You can learn how to use them by the [Sample flows](https://github.com/microsoft/promptflow/tree/e4542f6ff5d223d9800a3687a7cfd62531a9607c/examples/flows/integrations/azure-ai-language). Support contact: taincidents@microsoft.com | Custom | [promptflow-azure-ai-language](https://pypi.org/project/promptflow-azure-ai-language/) | --_*The asterisk marks indicate custom tools, which are created by the community that extend prompt flow's capabilities for specific use cases. They aren't officially maintained or endorsed by prompt flow team. When you encounter questions or issues for these tools, please prioritize using the support contact if it is provided in the description._ --To discover more custom tools developed by the open-source community, see [More custom tools](https://microsoft.github.io/promptflow/integrations/tools/https://docsupdatetracker.net/index.html). --## Remarks +| [LLM](./llm-tool.md) | Use large language models (LLM) with the Azure OpenAI Service for tasks such as text completion or chat. | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | +| [Prompt](./prompt-tool.md) | Craft a prompt by using Jinja as the templating language. | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | +| [Python](./python-tool.md) | Run Python code. | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | +| [Azure OpenAI GPT-4 Turbo with Vision](./azure-open-ai-gpt-4v-tool.md) | Use an Azure OpenAI GPT-4 Turbo with Vision model deployment to analyze images and provide textual responses to questions about them. | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | +| [Content Safety (Text)](./content-safety-tool.md) | Use Azure AI Content Safety to detect harmful content. | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | +| [Embedding](./embedding-tool.md) | Use Azure OpenAI embedding models to create an embedding vector that represents the input text. | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | +| [Serp API](./serp-api-tool.md) | Use Serp API to obtain search results from a specific search engine. | [promptflow-tools](https://pypi.org/project/promptflow-tools/) | +| [Index Lookup](./index-lookup-tool.md) | Search a vector-based query for relevant results using one or more text queries. | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | +| [Vector Index Lookup](./vector-index-lookup-tool.md)<sup>1</sup> | Search text or a vector-based query from a vector index. | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | +| [Faiss Index Lookup](./faiss-index-lookup-tool.md)<sup>1</sup> | Search a vector-based query from the Faiss index file. | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | +| [Vector DB Lookup](./vector-db-lookup-tool.md)<sup>1</sup> For | Search a vector-based query from an existing vector database. | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) | ++<sup>1</sup> The Index Lookup tool replaces the three deprecated legacy index tools: Vector Index Lookup, Vector DB Lookup, and Faiss Index Lookup. If you have a flow that contains one of those tools, follow the [migration steps](./index-lookup-tool.md#migrate-from-legacy-tools-to-the-index-lookup-tool) to upgrade your flow. ++## Custom tools ++To discover more custom tools developed by the open-source community such as [Azure AI Language tools](https://pypi.org/project/promptflow-azure-ai-language/), see [More custom tools](https://microsoft.github.io/promptflow/integrations/tools/https://docsupdatetracker.net/index.html). + - If existing tools don't meet your requirements, you can [develop your own custom tool and make a tool package](https://microsoft.github.io/promptflow/how-to-guides/develop-a-tool/create-and-use-tool-package.html).-- To install the custom tools, if you're using the automatic runtime, you can readily install the publicly released package by adding the custom tool package name into the `requirements.txt` file in the flow folder. Then select the **Save and install** button to start installation. After completion, you can see the custom tools displayed in the tool list. In addition, if you want to use local or private feed package, please build an image first, then set up the runtime based on your image. To learn more, see [How to create and manage a runtime](../create-manage-runtime.md).+- To install the custom tools, if you're using the automatic runtime, you can readily install the publicly released package by adding the custom tool package name in the `requirements.txt` file in the flow folder. Then select **Save and install** to start installation. After completion, the custom tools appear in the tool list. If you want to use a local or private feed package, build an image first, and then set up the runtime based on your image. To learn more, see [How to create and manage a runtime](../create-manage-runtime.md). ++ :::image type="content" source="../../media/prompt-flow/install-package-on-automatic-runtime.png" alt-text="Screenshot that shows how to install packages on automatic runtime."lightbox = "../../media/prompt-flow/install-package-on-automatic-runtime.png"::: ## Next steps |
ai-studio | Prompt Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/prompt-tool.md | Title: Prompt tool for flows in Azure AI Studio -description: This article introduces the Prompt tool for flows in Azure AI Studio. +description: This article introduces you to the Prompt tool for flows in Azure AI Studio. -The prompt flow *Prompt* tool offers a collection of textual templates that serve as a starting point for creating prompts. These templates, based on the [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) template engine, facilitate the definition of prompts. The tool proves useful when prompt tuning is required prior to feeding the prompts into the large language model (LLM) in prompt flow. +The prompt flow Prompt tool offers a collection of textual templates that serve as a starting point for creating prompts. These templates, based on the [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) template engine, facilitate the definition of prompts. The tool proves useful when prompt tuning is required before the prompts are fed into the large language model (LLM) in the prompt flow. ## Prerequisites -Prepare a prompt. The [LLM tool](llm-tool.md) and Prompt tool both support [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) templates. +Prepare a prompt. The [LLM tool](llm-tool.md) and Prompt tool both support [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) templates. -In this example, the prompt incorporates Jinja templating syntax to dynamically generate the welcome message and personalize it based on the user's name. It also presents a menu of options for the user to choose from. Depending on whether the user_name variable is provided, it either addresses the user by name or uses a generic greeting. +In this example, the prompt incorporates Jinja templating syntax to dynamically generate the welcome message and personalize it based on the user's name. It also presents a menu of options for the user to choose from. Depending on whether the `user_name` variable is provided, it either addresses the user by name or uses a generic greeting. ```jinja Welcome to {{ website_name }}! Please select an option from the menu below: 4. Contact customer support ``` -For more information and best practices, see [prompt engineering techniques](../../../ai-services/openai/concepts/advanced-prompt-engineering.md). +For more information and best practices, see [Prompt engineering techniques](../../../ai-services/openai/concepts/advanced-prompt-engineering.md). ## Build with the Prompt tool 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ Prompt** to add the Prompt tool to your flow. - :::image type="content" source="../../media/prompt-flow/prompt-tool.png" alt-text="Screenshot of the Prompt tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/prompt-tool.png"::: --1. Enter values for the Prompt tool input parameters described [here](#inputs). For information about how to prepare the prompt input, see [prerequisites](#prerequisites). -1. Add more tools (such as the [LLM tool](llm-tool.md)) to your flow as needed, or select **Run** to run the flow. -1. The outputs are described [here](#outputs). + :::image type="content" source="../../media/prompt-flow/prompt-tool.png" alt-text="Screenshot that shows the Prompt tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/prompt-tool.png"::: +1. Enter values for the Prompt tool input parameters described in the [Inputs table](#inputs). For information about how to prepare the prompt input, see [Prerequisites](#prerequisites). +1. Add more tools (such as the [LLM tool](llm-tool.md)) to your flow, as needed. Or select **Run** to run the flow. +1. The outputs are described in the [Outputs table](#outputs). ## Inputs -The following are available input parameters: +The following input parameters are available. | Name | Type | Description | Required | |--|--|-|-|-| prompt | string | The prompt template in Jinja | Yes | -| Inputs | - | List of variables of prompt template and its assignments | - | +| prompt | string | The prompt template in Jinja. | Yes | +| Inputs | - | The list of variables of a prompt template and its assignments. | - | ## Outputs ### Example 1 -Inputs +Inputs: -| Variable | Type | Sample Value | +| Variable | Type | Sample value | ||--|--| | website_name | string | "Microsoft" | | user_name | string | "Jane" | -Outputs +Outputs: ``` Welcome to Microsoft! Hello, Jane! Please select an option from the menu below: 1. View your account 2. Update personal information 3. Browse available products 4. Contact customer support Welcome to Microsoft! Hello, Jane! Please select an option from the menu below: ### Example 2 -Inputs +Inputs: -| Variable | Type | Sample Value | +| Variable | Type | Sample value | |--|--|-| | website_name | string | "Bing" | | user_name | string | " | -Outputs +Outputs: ``` Welcome to Bing! Hello there! Please select an option from the menu below: 1. View your account 2. Update personal information 3. Browse available products 4. Contact customer support |
ai-studio | Python Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/python-tool.md | Title: Python tool for flows in Azure AI Studio -description: This article introduces the Python tool for flows in Azure AI Studio. +description: This article introduces you to the Python tool for flows in Azure AI Studio. -The prompt flow *Python* tool offers customized code snippets as self-contained executable nodes. You can quickly create Python tools, edit code, and verify results. +The prompt flow Python tool offers customized code snippets as self-contained executable nodes. You can quickly create Python tools, edit code, and verify results. ## Build with the Python tool 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ Python** to add the Python tool to your flow. - :::image type="content" source="../../media/prompt-flow/python-tool.png" alt-text="Screenshot of the Python tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/python-tool.png"::: + :::image type="content" source="../../media/prompt-flow/python-tool.png" alt-text="Screenshot that shows the Python tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/python-tool.png"::: -1. Enter values for the Python tool input parameters described [here](#inputs). For example, in the **Code** input text box you can enter the following Python code: +1. Enter values for the Python tool input parameters that are described in the [Inputs table](#inputs). For example, in the **Code** input text box, you can enter the following Python code: ```python from promptflow import tool The prompt flow *Python* tool offers customized code snippets as self-contained For more information, see [Python code input requirements](#python-code-input-requirements). -1. Add more tools to your flow as needed, or select **Run** to run the flow. -1. The outputs are described [here](#outputs). Given the previous example Python code input, if the input message is "world", the output is `hello world`. -+1. Add more tools to your flow, as needed. Or select **Run** to run the flow. +1. The outputs are described in the [Outputs table](#outputs). Based on the previous example Python code input, if the input message is "world," the output is `hello world`. ## Inputs -The list of inputs will change based on the arguments of the tool function, after you save the code. Adding type to arguments and return values help the tool show the types properly. +The list of inputs change based on the arguments of the tool function, after you save the code. Adding type to arguments and `return` values helps the tool show the types properly. | Name | Type | Description | Required | |--|--|||-| Code | string | Python code snippet | Yes | -| Inputs | - | List of tool function parameters and its assignments | - | -+| Code | string | The Python code snippet. | Yes | +| Inputs | - | The list of the tool function parameters and its assignments. | - | ## Outputs -The output is the `return` value of the python tool function. For example, consider the following python tool function: +The output is the `return` value of the Python tool function. For example, consider the following Python tool function: ```python from promptflow import tool def my_python_tool(message: str) -> str: return 'hello ' + message ``` -If the input message is "world", the output is `hello world`. +If the input message is "world," the output is `hello world`. ### Types If the input message is "world", the output is `hello world`. | double | param: float | Double type | | list | param: list or param: List[T] | List type | | object | param: dict or param: Dict[K, V] | Object type |-| Connection | param: CustomConnection | Connection type will be handled specially | +| Connection | param: CustomConnection | Connection type is handled specially. | ++Parameters with `Connection` type annotation are treated as connection inputs, which means: -Parameters with `Connection` type annotation will be treated as connection inputs, which means: -- Prompt flow extension will show a selector to select the connection.-- During execution time, prompt flow will try to find the connection with the name same from parameter value passed in.+- The prompt flow extension shows a selector to select the connection. +- During execution time, the prompt flow tries to find the connection with the same name from the parameter value that was passed in. -> [!Note] -> `Union[...]` type annotation is only supported for connection type, for example, `param: Union[CustomConnection, OpenAIConnection]`. +> [!NOTE] +> The `Union[...]` type annotation is only supported for connection type. An example is `param: Union[CustomConnection, OpenAIConnection]`. ## Python code input requirements This section describes requirements of the Python code input for the Python tool. -- Python Tool Code should consist of a complete Python code, including any necessary module imports.-- Python Tool Code must contain a function decorated with `@tool` (tool function), serving as the entry point for execution. The `@tool` decorator should be applied only once within the snippet.-- Python tool function parameters must be assigned in 'Inputs' section+- Python tool code should consist of a complete Python code, including any necessary module imports. +- Python tool code must contain a function decorated with `@tool` (tool function), serving as the entry point for execution. The `@tool` decorator should be applied only once within the snippet. +- Python tool function parameters must be assigned in the `Inputs` section. - Python tool function shall have a return statement and value, which is the output of the tool. The following Python code is an example of best practices: def my_python_tool(message: str) -> str: return 'hello ' + message ``` -## Consume custom connection in the Python tool +## Consume a custom connection in the Python tool -If you're developing a python tool that requires calling external services with authentication, you can use the custom connection in prompt flow. It allows you to securely store the access key and then retrieve it in your python code. +If you're developing a Python tool that requires calling external services with authentication, you can use the custom connection in a prompt flow. It allows you to securely store the access key and then retrieve it in your Python code. ### Create a custom connection -Create a custom connection that stores all your LLM API KEY or other required credentials. +Create a custom connection that stores all your large language model API key or other required credentials. -1. Go to **AI project settings**, then select **New Connection**. -1. Select **Custom** service. You can define your connection name, and you can add multiple *Key-value pairs* to store your credentials and keys by selecting **Add key-value pairs**. +1. Go to **AI project settings**. Then select **New Connection**. +1. Select **Custom** service. You can define your connection name. You can add multiple key-value pairs to store your credentials and keys by selecting **Add key-value pairs**. > [!NOTE]- > Make sure at least one key-value pair is set as secret, otherwise the connection will not be created successfully. You can set one Key-Value pair as secret by **is secret** checked, which will be encrypted and stored in your key value. -- :::image type="content" source="../../media/prompt-flow/create-connection.png" alt-text="Screenshot that shows create connection in AI Studio." lightbox = "../../media/prompt-flow/create-connection.png"::: + > Make sure at least one key-value pair is set as secret. Otherwise, the connection won't be created successfully. To set one key-value pair as secret, select **is secret** to encrypt and store your key value. + :::image type="content" source="../../media/prompt-flow/create-connection.png" alt-text="Screenshot that shows creating a connection in AI Studio." lightbox = "../../media/prompt-flow/create-connection.png"::: 1. Add the following custom keys to the connection: - `azureml.flow.connection_type`: `Custom` - `azureml.flow.module`: `promptflow.connections` - :::image type="content" source="../../media/prompt-flow/custom-connection-keys.png" alt-text="Screenshot that shows add extra meta to custom connection in AI Studio." lightbox = "../../media/prompt-flow/custom-connection-keys.png"::: -- + :::image type="content" source="../../media/prompt-flow/custom-connection-keys.png" alt-text="Screenshot that shows adding extra information to a custom connection in AI Studio." lightbox = "../../media/prompt-flow/custom-connection-keys.png"::: -### Consume custom connection in Python +### Consume a custom connection in Python -To consume a custom connection in your python code, follow these steps: +To consume a custom connection in your Python code: -1. In the code section in your python node, import custom connection library `from promptflow.connections import CustomConnection`, and define an input parameter of type `CustomConnection` in the tool function. -1. Parse the input to the input section, then select your target custom connection in the value dropdown. +1. In the code section in your Python node, import the custom connection library `from promptflow.connections import CustomConnection`. Define an input parameter of the type `CustomConnection` in the tool function. +1. Parse the input to the input section. Then select your target custom connection in the value dropdown list. For example: def my_python_tool(message: str, myconn: CustomConnection) -> str: connection_key2_value = myconn.key2 ``` - ## Next steps - [Learn more about how to create a flow](../flow-develop.md) |
ai-studio | Serp Api Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/serp-api-tool.md | Title: Serp API tool for flows in Azure AI Studio -description: This article introduces the Serp API tool for flows in Azure AI Studio. +description: This article introduces you to the Serp API tool for flows in Azure AI Studio. -The prompt flow *Serp API* tool provides a wrapper to the [SerpAPI Google Search Engine Results API](https://serpapi.com/search-api) and [SerpApi Bing Search Engine Results API](https://serpapi.com/bing-search-api). +The prompt flow Serp API tool provides a wrapper to the [Serp API Google Search Engine Results API](https://serpapi.com/search-api) and [Serp API Bing Search Engine Results API](https://serpapi.com/bing-search-api). -You can use the tool to retrieve search results from many different search engines, including Google and Bing. You can specify a range of search parameters, such as the search query, location, device type, and more. +You can use the tool to retrieve search results from many different search engines, including Google and Bing. You can specify a range of search parameters, such as the search query, location, and device type. ## Prerequisites -Sign up at [SERP API homepage](https://serpapi.com/) +Sign up on the [Serp API home page](https://serpapi.com/). ++To create a Serp connection: -Create a Serp connection: 1. Sign in to [Azure AI Studio](https://studio.azureml.net/). 1. Go to **AI project settings** > **Connections**. 1. Select **+ New connection**. 1. Add the following custom keys to the connection:+ - `azureml.flow.connection_type`: `Custom` - `azureml.flow.module`: `promptflow.connections`- - `api_key`: Your_Serp_API_key. You must check the **is secret** checkbox to keep the API key secure. + - `api_key`: Your Serp API key. You must select the **is secret** checkbox to keep the API key secure. - :::image type="content" source="../../media/prompt-flow/serp-custom-connection-keys.png" alt-text="Screenshot that shows add extra meta to custom connection in AI Studio." lightbox = "../../media/prompt-flow/serp-custom-connection-keys.png"::: + :::image type="content" source="../../media/prompt-flow/serp-custom-connection-keys.png" alt-text="Screenshot that shows adding extra information to a custom connection in AI Studio." lightbox = "../../media/prompt-flow/serp-custom-connection-keys.png"::: -The connection is the model used to establish connections with Serp API. Get your API key from the SerpAPI account dashboard. +The connection is the model used to establish connections with the Serp API. Get your API key from the Serp API account dashboard. -| Type | Name | API KEY | +| Type | Name | API key | |-|-|-| | Serp | Required | Required | The connection is the model used to establish connections with Serp API. Get you 1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md). 1. Select **+ More tools** > **Serp API** to add the Serp API tool to your flow. - :::image type="content" source="../../media/prompt-flow/serp-api-tool.png" alt-text="Screenshot of the Serp API tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/serp-api-tool.png"::: + :::image type="content" source="../../media/prompt-flow/serp-api-tool.png" alt-text="Screenshot that shows the Serp API tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/serp-api-tool.png"::: 1. Select the connection to one of your provisioned resources. For example, select **SerpConnection** if you created a connection with that name. For more information, see [Prerequisites](#prerequisites).-1. Enter values for the Serp API tool input parameters described [here](#inputs). -1. Add more tools to your flow as needed, or select **Run** to run the flow. -1. The outputs are described [here](#outputs). -+1. Enter values for the Serp API tool input parameters described in the [Inputs table](#inputs). +1. Add more tools to your flow, as needed. Or select **Run** to run the flow. +1. The outputs are described in the [Outputs table](#outputs). ## Inputs -The following are available input parameters: -+The following input parameters are available. | Name | Type | Description | Required | |-|||-| | query | string | The search query to be executed. | Yes | | engine | string | The search engine to use for the search. Default is `google`. | Yes | | num | integer | The number of search results to return. Default is 10. | No |-| location | string | The geographic location to execute the search from. | No | +| location | string | The geographic location from which to execute the search. | No | | safe | string | The safe search mode to use for the search. Default is off. | No | - ## Outputs -The json representation from serpapi query. +The JSON representation from a `serpapi` query: -| Engine | Return Type | Output | +| Engine | Return type | Output | |-|-|-| | Google | json | [Sample](https://serpapi.com/search-api#api-examples) | | Bing | json | [Sample](https://serpapi.com/bing-search-api) | - ## Next steps - [Learn more about how to create a flow](../flow-develop.md)- |
ai-studio | Vector Db Lookup Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/vector-db-lookup-tool.md | -> Vector, Vector DB and Faiss Index Lookup tools are deprecated and will be retired soon. [Migrated to the new Index Lookup tool (preview).](index-lookup-tool.md#how-to-migrate-from-legacy-tools-to-the-index-lookup-tool) +> Vector, Vector DB and Faiss Index Lookup tools are deprecated and will be retired soon. [Migrated to the new Index Lookup tool (preview).](index-lookup-tool.md#migrate-from-legacy-tools-to-the-index-lookup-tool) The prompt flow *Vector DB Lookup* tool is a vector search tool that allows users to search top-k similar vectors from vector database. This tool is a wrapper for multiple third-party vector databases. The list of current supported databases is as follows. |
ai-studio | Vector Index Lookup Tool | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/how-to/prompt-flow-tools/vector-index-lookup-tool.md | -> Vector, Vector DB and Faiss Index Lookup tools are deprecated and will be retired soon. [Migrated to the new Index Lookup tool (preview).](index-lookup-tool.md#how-to-migrate-from-legacy-tools-to-the-index-lookup-tool) +> Vector, Vector DB and Faiss Index Lookup tools are deprecated and will be retired soon. [Migrated to the new Index Lookup tool (preview).](index-lookup-tool.md#migrate-from-legacy-tools-to-the-index-lookup-tool) The prompt flow *Vector index lookup* tool is tailored for querying within vector index such as Azure AI Search. You can extract contextually relevant information from a domain knowledge base. |
ai-studio | Multimodal Vision | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/quickstarts/multimodal-vision.md | Extra usage fees might apply for using GPT-4 Turbo with Vision and Azure AI Visi Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at <a href="https://aka.ms/oai/access" target="_blank">https://aka.ms/oai/access</a>. Open an issue on this repo to contact us if you have an issue. -- An [Azure AI hub resource](../how-to/create-azure-ai-resource.md) with a GPT-4 Turbo with Vision model deployed in one of the [regions that support GPT-4 Turbo with Vision](../../ai-services/openai/concepts/models.md#gpt-4-and-gpt-4-turbo-preview-model-availability): Australia East, Switzerland North, Sweden Central, and West US. When you deploy from your Azure AI project's **Deployments** page, select: `gpt-4` as the model name and `vision-preview` as the model version.+- An [Azure AI hub resource](../how-to/create-azure-ai-resource.md) with a GPT-4 Turbo with Vision model deployed in one of the [regions that support GPT-4 Turbo with Vision](../../ai-services/openai/concepts/models.md#gpt-4-and-gpt-4-turbo-preview-model-availability). When you deploy from your Azure AI project's **Deployments** page, select: `gpt-4` as the model name and `vision-preview` as the model version. - An [Azure AI project](../how-to/create-projects.md) in Azure AI Studio. ## Start a chat session to analyze images or video |
ai-studio | Deploy Chat Web App | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/tutorials/deploy-chat-web-app.md | To avoid incurring unnecessary Azure costs, you should delete the resources you ## Remarks -### Remarks about adding your data --Although it's beyond the scope of this tutorial, to understand more about how the model uses your data, you can export the playground setup to prompt flow. ---Following through from there you can see the graphical representation of how the model uses your data to construct the response. For more information about prompt flow, see [prompt flow](../how-to/prompt-flow.md). - ### Chat history With the chat history feature, your users will have access to their individual previous queries and responses. |
ai-studio | Deploy Copilot Ai Studio | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/ai-studio/tutorials/deploy-copilot-ai-studio.md | Now that you have your evaluation dataset, you can evaluate your flow by followi 1. Select a model to use for evaluation. In this example, select **gpt-35-turbo-16k**. Then select **Next**. > [!NOTE]- > Evaluation with AI-assisted metrics needs to call another GPT model to do the calculation. For best performance, use a GPT-4 or gpt-35-turbo-16k model. If you didn't previously deploy a GPT-4 or gpt-35-turbo-16k model, you can deploy another model by following the steps in [Deploy a chat model](#deploy-a-chat-model). Then return to this step and select the model you deployed. - > The evaluation process may take up lots of tokens, so it's recommended to use a model which can support >=16k tokens. + > Evaluation with AI-assisted metrics needs to call another GPT model to do the calculation. For best performance, use a model that supports at least 16k tokens such as gpt-4-32k or gpt-35-turbo-16k model. If you didn't previously deploy such a model, you can deploy another model by following the steps in [Deploy a chat model](#deploy-a-chat-model). Then return to this step and select the model you deployed. 1. Select **Add new dataset**. Then select **Next**. |
aks | Aks Extension Vs Code | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/aks-extension-vs-code.md | + + Title: Use the Azure Kubernetes Service (AKS) extension for Visual Studio Code +description: Learn how to the Azure Kubernetes Service (AKS) extension for Visual Studio Code to manage your Kubernetes clusters. ++ Last updated : 04/08/2024+++++# Use the Azure Kubernetes Service (AKS) extension for Visual Studio Code ++The Azure Kubernetes Service (AKS) extension for Visual Studio Code allows you to easily view and manage your AKS clusters from your development environment. ++## Features ++The Azure Kubernetes Service (AKS) extension for Visual Studio Code provides a rich set of features to help you manage your AKS clusters, including: ++* **Merge into Kubeconfig**: Merge your AKS cluster into your `kubeconfig` file to manage your cluster from the command line. +* **Save Kubeconfig**: Save your AKS cluster configuration to a file. +* **AKS Diagnostics**: View diagnostics information based on your cluster's backend telemetry for identity, security, networking, node health, and create, upgrade, delete, and scale issues. +* **AKS Periscope**: Extract detailed diagnostic information and export it to an Azure storage account for further analysis. +* **Install Azure Service Operator (ASO)**: Deploy the latest version of ASO and provision Azure resources within Kubernetes. +* **Start or stop a cluster**: Start or stop your AKS cluster to save costs when you're not using it. ++For more information, see [AKS extension for Visual Studio Code features](https://code.visualstudio.com/docs/azure/aksextensions#_features). ++## Installation ++1. Open Visual Studio Code. +2. In the **Extensions** view, search for **Azure Kubernetes Service**. +3. Select the **Azure Kubernetes Service** extension and then select **Install**. ++For more information, see [Install the AKS extension for Visual Studio Code](https://code.visualstudio.com/docs/azure/aksextensions#_install-the-azure-kubernetes-services-extension). ++## Next steps ++To learn more about other AKS add-ons and extensions, see [Add-ons, extensions, and other integrations with AKS](./integrations.md). + |
aks | App Routing | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/app-routing.md | With the retirement of [Open Service Mesh][open-service-mesh-docs] (OSM) by the - All global Azure DNS zones integrated with the add-on have to be in the same resource group. - All private Azure DNS zones integrated with the add-on have to be in the same resource group. - Editing the ingress-nginx `ConfigMap` in the `app-routing-system` namespace isn't supported.+- The following snippet annotations are blocked and will prevent an Ingress from being configured: `load_module`, `lua_package`, `_by_lua`, `location`, `root`, `proxy_pass`, `serviceaccount`, `{`, `}`, `'`. ## Enable application routing using Azure CLI |
aks | Azure Csi Disk Storage Provision | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/azure-csi-disk-storage-provision.md | For more information on Kubernetes volumes, see [Storage options for application ## Before you begin -* You need an Azure [storage account][azure-storage-account]. * Make sure you have Azure CLI version 2.0.59 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli]. * The Azure Disk CSI driver has a per-node volume limit. The volume count changes based on the size of the node/node pool. Run the [kubectl get][kubectl-get] command to determine the number of volumes that can be allocated per node: The following table includes parameters you can use to define a custom storage c |fsType | File System Type | `ext4`, `ext3`, `ext2`, `xfs`, `btrfs` for Linux, `ntfs` for Windows | No | `ext4` for Linux, `ntfs` for Windows| |cachingMode | [Azure Data Disk Host Cache Setting][disk-host-cache-setting] | `None`, `ReadOnly`, `ReadWrite` | No | `ReadOnly`| |resourceGroup | Specify the resource group for the Azure Disks | Existing resource group name | No | If empty, driver uses the same resource group name as current AKS cluster|-|DiskIOPSReadWrite | [UltraSSD disk][ultra-ssd-disks] IOPS Capability (minimum: 2 IOPS/GiB) | 100~160000 | No | `500`| -|DiskMBpsReadWrite | [UltraSSD disk][ultra-ssd-disks] Throughput Capability(minimum: 0.032/GiB) | 1~2000 | No | `100`| +|DiskIOPSReadWrite | [UltraSSD disk][ultra-ssd-disks] or [Premium SSD v2][premiumv2_lrs_disks] IOPS Capability (minimum: 2 IOPS/GiB) | 100~160000 | No | `500`| +|DiskMBpsReadWrite | [UltraSSD disk][ultra-ssd-disks] or [Premium SSD v2][premiumv2_lrs_disks] Throughput Capability(minimum: 0.032/GiB) | 1~2000 | No | `100`| |LogicalSectorSize | Logical sector size in bytes for ultra disk. Supported values are 512 ad 4096. 4096 is the default. | `512`, `4096` | No | `4096`| |tags | Azure Disk [tags][azure-tags] | Tag format: `key1=val1,key2=val2` | No | ""| |diskEncryptionSetID | ResourceId of the disk encryption set to use for [enabling encryption at rest][disk-encryption] | format: `/subscriptions/{subs-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSet-name}` | No | ""| Each AKS cluster includes four precreated storage classes, two of them configure 2. The *managed-csi-premium* storage class provisions a premium Azure Disk. * SSD-based high-performance, low-latency disks back Premium disks. They're ideal for VMs running production workloads. When you use the Azure Disk CSI driver on AKS, you can also use the `managed-csi` storage class, which is backed by Standard SSD locally redundant storage (LRS). -It's not supported to reduce the size of a PVC (to prevent data loss). You can edit an existing storage class using the `kubectl edit sc` command, or you can create your own custom storage class. For example, if you want to use a disk of size 4 TiB, you must create a storage class that defines `cachingmode: None` because [disk caching isn't supported for disks 4 TiB and larger][disk-host-cache-setting]. For more information about storage classes and creating your own storage class, see [Storage options for applications in AKS][storage-class-concepts]. +Reducing the size of a PVC is not supported due to the risk of data loss. You can edit an existing storage class using the `kubectl edit sc` command, or you can create your own custom storage class. For example, if you want to use a disk of size 4 TiB, you must create a storage class that defines `cachingmode: None` because [disk caching isn't supported for disks 4 TiB and larger][disk-host-cache-setting]. For more information about storage classes and creating your own storage class, see [Storage options for applications in AKS][storage-class-concepts]. You can see the precreated storage classes using the [`kubectl get sc`][kubectl-get] command. The following example shows the precreated storage classes available within an AKS cluster: For more information on using Azure tags, see [Use Azure tags in Azure Kubernete ## Statically provision a volume -This section provides guidance for cluster administrators who want to create one or more persistent volumes that include details of Azure Disks storage for use by a workload. +This section provides guidance for cluster administrators who want to create one or more persistent volumes that include details of Azure Disks for use by a workload. -### Static provisioning parameters for PersistentVolume +### Static provisioning parameters for a persistent volume -The following table includes parameters you can use to define a PersistentVolume. +The following table includes parameters you can use to define a persistent volume. |Name | Meaning | Available Value | Mandatory | Default value| | | | | | | When you create an Azure disk for use with AKS, you can create the disk resource ```azurecli-interactive az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv+ ``` - # Output + The output of the command resembles the following example: + + ```output MC_myResourceGroup_myAKSCluster_eastus ``` -2. Create a disk using the [`az disk create`][az-disk-create] command. Specify the node resource group name and a name for the disk resource, such as *myAKSDisk*. The following example creates a *20*GiB disk, and outputs the ID of the disk after it's created. If you need to create a disk for use with Windows Server containers, add the `--os-type windows` parameter to correctly format the disk. +1. Create a disk using the [`az disk create`][az-disk-create] command. Specify the node resource group name and a name for the disk resource, such as *myAKSDisk*. The following example creates a *20*GiB disk, and outputs the ID of the disk after it's created. If you need to create a disk for use with Windows Server containers, add the `--os-type windows` parameter to correctly format the disk. ```azurecli-interactive az disk create \ kubectl delete -f azure-pvc.yaml [disk-host-cache-setting]: ../virtual-machines/windows/premium-storage-performance.md#disk-caching [use-ultra-disks]: use-ultra-disks.md [ultra-ssd-disks]: ../virtual-machines/linux/disks-ultra-ssd.md+[premiumv2_lrs_disks]: ../virtual-machines/disks-types.md#premium-ssd-v2 [azure-tags]: ../azure-resource-manager/management/tag-resources.md [disk-encryption]: ../virtual-machines/windows/disk-encryption.md [azure-disk-write-accelerator]: ../virtual-machines/windows/how-to-enable-write-accelerator.md |
aks | Concepts Network Services | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/concepts-network-services.md | + + Title: Concepts - Services in Azure Kubernetes Services (AKS) +description: Learn about networking Services in Azure Kubernetes Service (AKS), including what services are in Kubernetes and what types of Services are available in AKS. + Last updated : 04/08/2024++++# Kubernetes Services in AKS ++Kubernetes Services are used to logically group pods and provide network connectivity by allowing direct access to them through a specific IP address or DNS name on a designated port. This allows you to expose your application workloads to other services within the cluster or to external clients without having to manually manage the network configuration for each pod hosting a workload. ++You can specify a Kubernetes _ServiceType_ to define the type of Service you want, e.g., if you want to expose a Service on an external IP address outside of your cluster. For more information, see the Kubernetes documentation on [Publishing Services (ServiceTypes)][service-types]. ++The following ServiceTypes are available in AKS: ++## ClusterIP + + ClusterIP creates an internal IP address for use within the AKS cluster. The ClusterIP Service is good for _internal-only applications_ that support other workloads within the cluster. ClusterIP is used by default if you don't explicitly specify a type for a Service. ++ ![Diagram showing ClusterIP traffic flow in an AKS cluster.][aks-clusterip] ++## NodePort ++ NodePort creates a port mapping on the underlying node that allows the application to be accessed directly with the node IP address and port. ++ ![Diagram showing NodePort traffic flow in an AKS cluster.][aks-nodeport] ++## LoadBalancer ++ LoadBalancer creates an Azure load balancer resource, configures an external IP address, and connects the requested pods to the load balancer backend pool. To allow customers' traffic to reach the application, load balancing rules are created on the desired ports. ++ ![Diagram showing Load Balancer traffic flow in an AKS cluster.][aks-loadbalancer] ++ For HTTP load balancing of inbound traffic, another option is to use an [Ingress controller][ingress-controllers]. ++## ExternalName ++ Creates a specific DNS entry for easier application access. ++Either the load balancers and services IP address can be dynamically assigned, or you can specify an existing static IP address. You can assign both internal and external static IP addresses. Existing static IP addresses are often tied to a DNS entry. ++You can create both _internal_ and _external_ load balancers. Internal load balancers are only assigned a private IP address, so they can't be accessed from the Internet. ++Learn more about Services in the [Kubernetes docs][k8s-service]. ++<!-- IMAGES --> +[aks-clusterip]: media/concepts-network/aks-clusterip.png +[aks-nodeport]: media/concepts-network/aks-nodeport.png +[aks-loadbalancer]: media/concepts-network/aks-loadbalancer.png ++<!-- LINKS - External --> +[k8s-service]: https://kubernetes.io/docs/concepts/services-networking/service/ +[service-types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types ++<!-- LINKS - Internal --> +[ingress-controllers]:concepts-network.md#ingress-controllers |
aks | Concepts Network | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/concepts-network.md | -* You can connect to and expose applications internally or externally. -* You can build highly available applications by load balancing your applications. -* You can restrict the flow of network traffic into or between pods and nodes to improve security. -* You can configure Ingress traffic for SSL/TLS termination or routing of multiple components for your more complex applications. +- You can connect to and expose applications internally or externally. +- You can build highly available applications by load balancing your applications. +- You can restrict the flow of network traffic into or between pods and nodes to improve security. +- You can configure Ingress traffic for SSL/TLS termination or routing of multiple components for your more complex applications. This article introduces the core concepts that provide networking to your applications in AKS: -* [Services and ServiceTypes](#services) -* [Azure virtual networks](#azure-virtual-networks) -* [Ingress controllers](#ingress-controllers) -* [Network policies](#network-policies) +- [Azure virtual networks](#azure-virtual-networks) +- [Ingress controllers](#ingress-controllers) +- [Network policies](#network-policies) ## Kubernetes networking basics Kubernetes employs a virtual networking layer to manage access within and betwee Regarding specific Kubernetes functionalities: -- **Services**: Services is used to logically group pods, allowing direct access to them through a specific IP address or DNS name on a designated port.-- **Service types**: Specifies the kind of Service you wish to create. - **Load balancer**: You can use a load balancer to distribute network traffic evenly across various resources. - **Ingress controllers**: These facilitate Layer 7 routing, which is essential for directing application traffic. - **Egress traffic control**: Kubernetes allows you to manage and control outbound traffic from cluster nodes. In the context of the Azure platform: - As you open network ports to pods, Azure automatically configures the necessary network security group rules. - Azure can also manage external DNS configurations for HTTP application routing as new Ingress routes are established. -## Services --To simplify the network configuration for application workloads, Kubernetes uses *Services* to logically group a set of pods together and provide network connectivity. You can specify a Kubernetes *ServiceType* to define the type of Service you want. For example, if you want to expose a Service on an external IP address outside of your cluster. For more information, see the Kubernetes documentation on [Publishing Services (ServiceTypes)][service-types]. --The following ServiceTypes are available: --* **ClusterIP** - - ClusterIP creates an internal IP address for use within the AKS cluster. The ClusterIP Service is good for *internal-only applications* that support other workloads within the cluster. ClusterIP is the default used if you don't explicitly specify a type for a Service. -- ![Diagram showing ClusterIP traffic flow in an AKS cluster][aks-clusterip] --* **NodePort** -- NodePort creates a port mapping on the underlying node that allows the application to be accessed directly with the node IP address and port. -- ![Diagram showing NodePort traffic flow in an AKS cluster][aks-nodeport] --* **LoadBalancer** -- LoadBalancer creates an Azure load balancer resource, configures an external IP address, and connects the requested pods to the load balancer backend pool. To allow customers' traffic to reach the application, load balancing rules are created on the desired ports. -- ![Diagram showing Load Balancer traffic flow in an AKS cluster][aks-loadbalancer] -- For HTTP load balancing of inbound traffic, another option is to use an [Ingress controller](#ingress-controllers). --* **ExternalName** -- Creates a specific DNS entry for easier application access. --Either the load balancers and services IP address can be dynamically assigned, or you can specify an existing static IP address. You can assign both internal and external static IP addresses. Existing static IP addresses are often tied to a DNS entry. --You can create both *internal* and *external* load balancers. Internal load balancers are only assigned a private IP address, so they can't be accessed from the Internet. --Learn more about Services in the [Kubernetes docs][k8s-service]. - ## Azure virtual networks In AKS, you can deploy a cluster that uses one of the following network models: -* ***Kubenet* networking** +- ***Kubenet* networking** The network resources are typically created and configured as the AKS cluster is deployed. -* ***Azure Container Networking Interface (CNI)* networking** +- ***Azure Container Networking Interface (CNI)* networking** The AKS cluster is connected to existing virtual network resources and configurations. It's possible to install in AKS a non-Microsoft CNI using the [Bring your own CN Both kubenet and Azure CNI provide network connectivity for your AKS clusters. However, there are advantages and disadvantages to each. At a high level, the following considerations apply: -* **kubenet** +- **kubenet** - * Conserves IP address space. - * Uses Kubernetes internal or external load balancers to reach pods from outside of the cluster. - * You manually manage and maintain user-defined routes (UDRs). - * Maximum of 400 nodes per cluster. + - Conserves IP address space. + - Uses Kubernetes internal or external load balancers to reach pods from outside of the cluster. + - You manually manage and maintain user-defined routes (UDRs). + - Maximum of 400 nodes per cluster. -* **Azure CNI** +- **Azure CNI** * Pods get full virtual network connectivity and can be directly reached via their private IP address from connected networks. * Requires more IP address space. For more information on Azure CNI and kubenet and to help determine which option Whatever network model you use, both kubenet and Azure CNI can be deployed in one of the following ways: -* The Azure platform can automatically create and configure the virtual network resources when you create an AKS cluster. -* You can manually create and configure the virtual network resources and attach to those resources when you create your AKS cluster. +- The Azure platform can automatically create and configure the virtual network resources when you create an AKS cluster. +- You can manually create and configure the virtual network resources and attach to those resources when you create your AKS cluster. Although capabilities like service endpoints or UDRs are supported with both kubenet and Azure CNI, the [support policies for AKS][support-policies] define what changes you can make. For example: -* If you manually create the virtual network resources for an AKS cluster, you're supported when configuring your own UDRs or service endpoints. -* If the Azure platform automatically creates the virtual network resources for your AKS cluster, you can't manually change those AKS-managed resources to configure your own UDRs or service endpoints. +- If you manually create the virtual network resources for an AKS cluster, you're supported when configuring your own UDRs or service endpoints. +- If the Azure platform automatically creates the virtual network resources for your AKS cluster, you can't manually change those AKS-managed resources to configure your own UDRs or service endpoints. ## Ingress controllers The following table lists the different scenarios where you might use each ingre The application routing addon is the recommended way to configure an Ingress controller in AKS. The application routing addon is a fully managed ingress controller for Azure Kubernetes Service (AKS) that provides the following features: -* Easy configuration of managed NGINX Ingress controllers based on Kubernetes NGINX Ingress controller. +- Easy configuration of managed NGINX Ingress controllers based on Kubernetes NGINX Ingress controller. -* Integration with Azure DNS for public and private zone management. +- Integration with Azure DNS for public and private zone management. -* SSL termination with certificates stored in Azure Key Vault. +- SSL termination with certificates stored in Azure Key Vault. For more information about the application routing addon, see [Managed NGINX ingress with the application routing add-on](app-routing.md). For more information, see [How network security groups filter network traffic][n By default, all pods in an AKS cluster can send and receive traffic without limitations. For improved security, define rules that control the flow of traffic, like: -* Back-end applications are only exposed to required frontend services. -* Database components are only accessible to the application tiers that connect to them. +- Back-end applications are only exposed to required frontend services. +- Database components are only accessible to the application tiers that connect to them. Network policy is a Kubernetes feature available in AKS that lets you control the traffic flow between pods. You can allow or deny traffic to the pod based on settings such as assigned labels, namespace, or traffic port. While network security groups are better for AKS nodes, network policies are a more suited, cloud-native way to control the flow of traffic for pods. As pods are dynamically created in an AKS cluster, required network policies can be automatically applied. For associated best practices, see [Best practices for network connectivity and For more information on core Kubernetes and AKS concepts, see the following articles: -* [Kubernetes / AKS clusters and workloads][aks-concepts-clusters-workloads] -* [Kubernetes / AKS access and identity][aks-concepts-identity] -* [Kubernetes / AKS security][aks-concepts-security] -* [Kubernetes / AKS storage][aks-concepts-storage] -* [Kubernetes / AKS scale][aks-concepts-scale] +- [Kubernetes / AKS clusters and workloads][aks-concepts-clusters-workloads] +- [Kubernetes / AKS access and identity][aks-concepts-identity] +- [Kubernetes / AKS security][aks-concepts-security] +- [Kubernetes / AKS storage][aks-concepts-storage] +- [Kubernetes / AKS scale][aks-concepts-scale] <!-- IMAGES -->-[aks-clusterip]: ./media/concepts-network/aks-clusterip.png -[aks-nodeport]: ./media/concepts-network/aks-nodeport.png [aks-loadbalancer]: ./media/concepts-network/aks-loadbalancer.png [advanced-networking-diagram]: ./media/concepts-network/advanced-networking-diagram.png [aks-ingress]: ./media/concepts-network/aks-ingress.png <!-- LINKS - External --> [cni-networking]: https://github.com/Azure/azure-container-networking/blob/master/docs/cni.md-[k8s-service]: https://kubernetes.io/docs/concepts/services-networking/service/ -[service-types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types <!-- LINKS - Internal --> [aks-configure-kubenet-networking]: configure-kubenet.md |
aks | Csi Secrets Store Driver | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/csi-secrets-store-driver.md | A container using *subPath volume mount* doesn't receive secret updates when it' 1. Create an Azure resource group using the [`az group create`][az-group-create] command. ```azurecli-interactive- az group create -n myResourceGroup -l eastus2 + az group create --name myResourceGroup --location eastus2 ``` -2. Create an AKS cluster with Azure Key Vault provider for Secrets Store CSI Driver capability using the [`az aks create`][az-aks-create] command and enable the `azure-keyvault-secrets-provider` add-on. +2. Create an AKS cluster with Azure Key Vault provider for Secrets Store CSI Driver capability using the [`az aks create`][az-aks-create] command with the --enable-managed-identity parameter and the `--enable-addons azure-keyvault-secrets-provider` parameter. The add-on creates a user-assigned managed identity you can use to authenticate to your key vault. The following example creates an AKS cluster with the Azure Key Vault provider for Secrets Store CSI Driver enabled. > [!NOTE] > If you want to use Microsoft Entra Workload ID, you must also use the `--enable-oidc-issuer` and `--enable-workload-identity` parameters, such as in the following example: > > ```azurecli-interactive- > az aks create -n myAKSCluster -g myResourceGroup --enable-addons azure-keyvault-secrets-provider --enable-oidc-issuer --enable-workload-identity + > az aks create --name myAKSCluster --resource-group myResourceGroup --enable-addons azure-keyvault-secrets-provider --enable-oidc-issuer --enable-workload-identity > ``` ```azurecli-interactive- az aks create -n myAKSCluster -g myResourceGroup --enable-addons azure-keyvault-secrets-provider + az aks create --name myAKSCluster --resource-group myResourceGroup --enable-managed-identity --enable-addons azure-keyvault-secrets-provider ``` -3. The add-on creates a user-assigned managed identity, `azureKeyvaultSecretsProvider`, to access Azure resources. The following example uses this identity to connect to the key vault that stores the secrets, but you can also use other [identity access methods][identity-access-methods]. Take note of the identity's `clientId` in the output. +3. The previous command creates a user-assigned managed identity, `azureKeyvaultSecretsProvider`, to access Azure resources. The following example uses this identity to connect to the key vault that stores the secrets, but you can also use other [identity access methods][identity-access-methods]. Take note of the identity's `clientId` in the output. - ```json + ```output ..., "addonProfiles": { "azureKeyvaultSecretsProvider": { A container using *subPath volume mount* doesn't receive secret updates when it' ```azurecli-interactive ## Create a new Azure key vault- az keyvault create -n <keyvault-name> -g myResourceGroup -l eastus2 --enable-rbac-authorization + az keyvault create --name <keyvault-name> --resource-group myResourceGroup --location eastus2 --enable-rbac-authorization ## Update an existing Azure key vault- az keyvault update -n <keyvault-name> -g myResourceGroup -l eastus2 --enable-rbac-authorization + az keyvault update --name <keyvault-name> --resource-group myResourceGroup --location eastus2 --enable-rbac-authorization ``` 2. Your key vault can store keys, secrets, and certificates. In this example, use the [`az keyvault secret set`][az-keyvault-secret-set] command to set a plain-text secret called `ExampleSecret`. ```azurecli-interactive- az keyvault secret set --vault-name <keyvault-name> -n ExampleSecret --value MyAKSExampleSecret + az keyvault secret set --vault-name <keyvault-name> --name ExampleSecret --value MyAKSExampleSecret ``` 3. Take note of the following properties for future use: |
aks | Deploy Marketplace | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/deploy-marketplace.md | Kubernetes application-based container offers can't be deployed on AKS for Azure 1. You can search for an offer or publisher directly by name, or you can browse all offers. To find Kubernetes application offers, on the left side under **Categories** select **Containers**. :::image type="content" source="./media/deploy-marketplace/containers-inline.png" alt-text="Screenshot of Azure Marketplace offers in the Azure portal, with the container category on the left side highlighted." lightbox="./media/deploy-marketplace/containers.png":::-+ > [!IMPORTANT]- > The **Containers** category includes both Kubernetes applications and standalone container images. This walkthrough is specific to Kubernetes applications. If you find that the steps to deploy an offer differ in some way, you're most likely trying to deploy a container image-based offer instead of a Kubernetes application-based offer. -+ > The **Containers** category includes Kubernetes applications. This walkthrough is specific to Kubernetes applications. 1. You'll see several Kubernetes application offers displayed on the page. To view all of the Kubernetes application offers, select **See more**. :::image type="content" source="./media/deploy-marketplace/see-more-inline.png" alt-text="Screenshot of Azure Marketplace K8s offers in the Azure portal. 'See More' is highlighted." lightbox="./media/deploy-marketplace/see-more.png"::: If you experience issues, see the [troubleshooting checklist for failed deployme - Learn more about [exploring and analyzing costs][billing]. - Learn more about [deploying a Kubernetes application programmatically using Azure CLI](/azure/aks/deploy-application-az-cli)+ - Learn more about [deploying a Kubernetes application through an ARM template](/azure/aks/deploy-application-template) <!-- LINKS --> |
aks | Howto Deploy Java Liberty App | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/howto-deploy-java-liberty-app.md | Title: Deploy a Java application with Open Liberty/WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster recommendations: false -description: Deploy a Java application with Open Liberty/WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster -+description: Deploy a Java application with Open Liberty or WebSphere Liberty on an AKS cluster by using the Azure Marketplace offer, which automatically provisions resources. + Previously updated : 01/16/2024 Last updated : 04/02/2024 keywords: java, jakartaee, javaee, microprofile, open-liberty, websphere-liberty, aks, kubernetes -# Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster +# Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service cluster This article demonstrates how to: -* Run your Java, Java EE, Jakarta EE, or MicroProfile application on the Open Liberty or WebSphere Liberty runtime. -* Build the application Docker image using Open Liberty or WebSphere Liberty container images. -* Deploy the containerized application to an AKS cluster using the Open Liberty Operator or WebSphere Liberty Operator. +* Run your Java, Java EE, Jakarta EE, or MicroProfile application on the [Open Liberty](https://openliberty.io/) or [IBM WebSphere Liberty](https://www.ibm.com/cloud/websphere-liberty) runtime. +* Build the application's Docker image by using Open Liberty or WebSphere Liberty container images. +* Deploy the containerized application to an Azure Kubernetes Service (AKS) cluster by using the Open Liberty Operator or WebSphere Liberty Operator. -The Open Liberty Operator simplifies the deployment and management of applications running on Kubernetes clusters. With the Open Liberty or WebSphere Liberty Operator, you can also perform more advanced operations, such as gathering traces and dumps. +The Open Liberty Operator simplifies the deployment and management of applications running on Kubernetes clusters. With the Open Liberty Operator or WebSphere Liberty Operator, you can also perform more advanced operations, such as gathering traces and dumps. -For more information on Open Liberty, see [the Open Liberty project page](https://openliberty.io/). For more information on IBM WebSphere Liberty, see [the WebSphere Liberty product page](https://www.ibm.com/cloud/websphere-liberty). +This article uses the Azure Marketplace offer for Open Liberty or WebSphere Liberty to accelerate your journey to AKS. The offer automatically provisions some Azure resources, including: -This article uses the Azure Marketplace offer for Open/WebSphere Liberty to accelerate your journey to AKS. The offer automatically provisions a number of Azure resources including an Azure Container Registry (ACR) instance, an AKS cluster, an Azure App Gateway Ingress Controller (AGIC) instance, the Liberty Operator, and optionally a container image including Liberty and your application. To see the offer, visit the [Azure portal](https://aka.ms/liberty-aks). If you prefer manual step-by-step guidance for running Liberty on AKS that doesn't utilize the automation enabled by the offer, see [Manually deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster](/azure/developer/java/ee/howto-deploy-java-liberty-app-manual). +* An Azure Container Registry instance. +* An AKS cluster. +* An Application Gateway Ingress Controller (AGIC) instance. +* The Open Liberty Operator and WebSphere Liberty Operator. +* Optionally, a container image that includes Liberty and your application. -This article is intended to help you quickly get to deployment. Before going to production, you should explore [Tuning Liberty](https://www.ibm.com/docs/was-liberty/base?topic=tuning-liberty). +If you prefer manual step-by-step guidance for running Liberty on AKS, see [Manually deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster](/azure/developer/java/ee/howto-deploy-java-liberty-app-manual). +This article is intended to help you quickly get to deployment. Before you go to production, you should explore the [IBM documentation about tuning Liberty](https://www.ibm.com/docs/was-liberty/base?topic=tuning-liberty). -* You can use Azure Cloud Shell or a local terminal. +## Prerequisites -* This article requires at least version 2.31.0 of Azure CLI. If using Azure Cloud Shell, the latest version is already installed. +* Install the [Azure CLI](/cli/azure/install-azure-cli). If you're running on Windows or macOS, consider running the Azure CLI in a Docker container. For more information, see [How to run the Azure CLI in a Docker container](/cli/azure/run-azure-cli-docker). +* Sign in to the Azure CLI by using the [az login](/cli/azure/reference-index#az-login) command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see [Authentication methods](/cli/azure/authenticate-azure-cli). +* When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see [Use and manage extensions with the Azure CLI](/cli/azure/azure-cli-extensions-overview). +* Run [az version](/cli/azure/reference-index?#az-version) to find the version and dependent libraries that are installed. To upgrade to the latest version, run [az upgrade](/cli/azure/reference-index?#az-upgrade). This article requires at least version 2.31.0 of the Azure CLI. +* Install a Java SE implementation, version 17 or later (for example, [Eclipse Open J9](https://www.eclipse.org/openj9/)). +* Install [Maven](https://maven.apache.org/download.cgi) 3.5.0 or later. +* Install [Docker](https://docs.docker.com/get-docker/) for your operating system. +* Ensure that [Git](https://git-scm.com) is installed. +* Make sure you're assigned either the Owner role or the Contributor and User Access Administrator roles in the subscription. You can verify roles by following the steps in [List role assignments for a user or group](../role-based-access-control/role-assignments-list-portal.md#list-role-assignments-for-a-user-or-group). > [!NOTE]-> You can also execute this guidance from the [Azure Cloud Shell](/azure/cloud-shell/quickstart). This approach has all the prerequisite tools pre-installed, with the exception of Docker. +> You can also run the commands in this article from [Azure Cloud Shell](/azure/cloud-shell/quickstart). This approach has all the prerequisite tools preinstalled, with the exception of Docker. >-> :::image type="icon" source="~/reusable-content/ce-skilling/azure/media/cloud-shell/launch-cloud-shell-button.png" alt-text="Button to launch the Azure Cloud Shell." border="false" link="https://shell.azure.com"::: +> :::image type="icon" source="~/reusable-content/ce-skilling/azure/media/cloud-shell/launch-cloud-shell-button.png" alt-text="Button to open Azure Cloud Shell." border="false" link="https://shell.azure.com"::: -* If running the commands in this guide locally (instead of Azure Cloud Shell): - * Prepare a local machine with Unix-like operating system installed (for example, Ubuntu, Azure Linux, macOS, Windows Subsystem for Linux). - * Install a Java SE implementation, version 17 or later. (for example, [Eclipse Open J9](https://www.eclipse.org/openj9/)). - * Install [Maven](https://maven.apache.org/download.cgi) 3.5.0 or higher. - * Install [Docker](https://docs.docker.com/get-docker/) for your OS. -* Make sure you're assigned either the `Owner` role or the `Contributor` and `User Access Administrator` roles in the subscription. You can verify it by following steps in [List role assignments for a user or group](../role-based-access-control/role-assignments-list-portal.md#list-role-assignments-for-a-user-or-group). +## Create a deployment of Liberty on AKS by using the portal -## Create a Liberty on AKS deployment using the portal +The following steps guide you to create a Liberty runtime on AKS. After you complete these steps, you'll have a Container Registry instance and an AKS cluster for deploying your containerized application. -The following steps guide you to create a Liberty runtime on AKS. After completing these steps, you have an Azure Container Registry and an Azure Kubernetes Service cluster for deploying your containerized application. +1. Go to the [Azure portal](https://portal.azure.com/). In the search box at the top of the page, enter **IBM Liberty on AKS**. When the suggestions appear, select the one and only match in the **Marketplace** section. -1. Visit the [Azure portal](https://portal.azure.com/). In the search box at the top of the page, type *IBM WebSphere Liberty and Open Liberty on Azure Kubernetes Service*. When the suggestions start appearing, select the one and only match that appears in the **Marketplace** section. If you prefer, you can go directly to the offer with this shortcut link: [https://aka.ms/liberty-aks](https://aka.ms/liberty-aks). + If you prefer, you can [go directly to the offer](https://aka.ms/liberty-aks). 1. Select **Create**. -1. In the **Basics** pane: -- 1. Create a new resource group. Because resource groups must be unique within a subscription, pick a unique name. An easy way to have unique names is to use a combination of your initials, today's date, and some identifier. For example, `ejb0913-java-liberty-project-rg`. - 1. Select *East US* as **Region**. - - Create environment variables in your shell for the resource group names for the cluster and the database. - - ### [Bash](#tab/in-bash) - - ```bash - export RESOURCE_GROUP_NAME=<your-resource-group-name> - export DB_RESOURCE_GROUP_NAME=<your-resource-group-name> - ``` - - ### [PowerShell](#tab/in-powershell) - - ```powershell - $Env:RESOURCE_GROUP_NAME="<your-resource-group-name>" - $Env:DB_RESOURCE_GROUP_NAME="<your-resource-group-name>" - ``` - - +1. On the **Basics** pane: ++ 1. Create a new resource group. Because resource groups must be unique within a subscription, choose a unique name. An easy way to have unique names is to use a combination of your initials, today's date, and some identifier (for example, `ejb0913-java-liberty-project-rg`). + 1. For **Region**, select **East US**. ++ 1. Create an environment variable in your shell for the resource group names for the cluster and the database: ++ ### [Bash](#tab/in-bash) ++ ```bash + export RESOURCE_GROUP_NAME=<your-resource-group-name> + ``` ++ ### [PowerShell](#tab/in-powershell) -1. Select **Next**, enter the **AKS** pane. This pane allows you to select an existing AKS cluster and Azure Container Registry (ACR), instead of causing the deployment to create a new one, if desired. This capability enables you to use the sidecar pattern, as shown in the [Azure architecture center](/azure/architecture/patterns/sidecar). You can also adjust the settings for the size and number of the virtual machines in the AKS node pool. The remaining values do not need to be changed from their default values. + ```powershell + $Env:RESOURCE_GROUP_NAME="<your-resource-group-name>" + ``` ++ ++1. Select **Next**. On the **AKS** pane, you can optionally select an existing AKS cluster and Container Registry instance, instead of causing the deployment to create new ones. This choice enables you to use the sidecar pattern, as shown in the [Azure Architecture Center](/azure/architecture/patterns/sidecar). You can also adjust the settings for the size and number of the virtual machines in the AKS node pool. ++ For the purposes of this article, just keep all the defaults on this pane. -1. Select **Next**, enter the **Load Balancing** pane. Next to **Connect to Azure Application Gateway?** select **Yes**. This section lets you customize the following deployment options. +1. Select **Next**. On the **Load Balancing** pane, next to **Connect to Azure Application Gateway?**, select **Yes**. In this section, you can customize the following deployment options: - 1. You can customize the **virtual network** and **subnet** into which the deployment will place the resources. The remaining values do not need to be changed from their default values. - 1. You can provide the **TLS/SSL certificate** presented by the Azure Application Gateway. Leave the values at the default to cause the offer to generate a self-signed certificate. Don't go to production using a self-signed certificate. For more information about self-signed certificates, see [Create a self-signed public certificate to authenticate your application](../active-directory/develop/howto-create-self-signed-certificate.md). - 1. You can select **Enable cookie based affinity**, also known as sticky sessions. We want sticky sessions enabled for this article, so ensure this option is selected. + * For **Virtual network** and **Subnet**, you can optionally customize the virtual network and subnet into which the deployment places the resources. You don't need to change the remaining values from their defaults. + * For **TLS/SSL certificate**, you can provide the TLS/SSL certificate from Azure Application Gateway. Leave the values at their defaults to cause the offer to generate a self-signed certificate. -1. Select **Next**, enter the **Operator and application** pane. This quickstart uses all defaults in this pane. However, it lets you customize the following deployment options. + Don't go to production with a self-signed certificate. For more information about self-signed certificates, see [Create a self-signed public certificate to authenticate your application](../active-directory/develop/howto-create-self-signed-certificate.md). + * You can select **Enable cookie based affinity**, also known as sticky sessions. This article uses sticky sessions, so be sure to select this option. - 1. You can deploy WebSphere Liberty Operator by selecting **Yes** for option **IBM supported?**. Leaving the default **No** deploys Open Liberty Operator. - 1. You can deploy an application for your selected Operator by selecting **Yes** for option **Deploy an application?**. Leaving the default **No** doesn't deploy any application. +1. Select **Next**. On the **Operator and application** pane, this article uses all the defaults. However, you can customize the following deployment options: -1. Select **Review + create** to validate your selected options. In the ***Review + create** pane, when you see **Create** light up after validation pass, select **Create**. The deployment may take up to 20 minutes. While you wait for the deployment to complete, you can follow the steps in the section [Create an Azure SQL Database](#create-an-azure-sql-database). After completing that section, come back here and continue. + * You can deploy WebSphere Liberty Operator by selecting **Yes** for the option **IBM supported?**. Leaving the default **No** deploys Open Liberty Operator. + * You can deploy an application for your selected operator by selecting **Yes** for the option **Deploy an application?**. Leaving the default **No** doesn't deploy any application. ++1. Select **Review + create** to validate your selected options. On the **Review + create** pane, when you see **Create** become available after validation passes, select it. ++ The deployment can take up to 20 minutes. While you wait for the deployment to finish, you can follow the steps in the section [Create an Azure SQL Database instance](#create-an-azure-sql-database-instance). After you complete that section, come back here and continue. ## Capture selected information from the deployment -If you navigated away from the **Deployment is in progress** page, the following steps will show you how to get back to that page. If you're still on the page that shows **Your deployment is complete**, you can skip to the third step. +If you moved away from the **Deployment is in progress** pane, the following steps show you how to get back to that pane. If you're still on the pane that shows **Your deployment is complete**, go to the newly created resource group and skip to the third step. -1. In the upper left of any portal page, select the hamburger menu and select **Resource groups**. -1. In the box with the text **Filter for any field**, enter the first few characters of the resource group you created previously. If you followed the recommended convention, enter your initials, then select the appropriate resource group. -1. In the list of resources in the resource group, select the resource with **Type** of **Container registry**. -1. In the navigation pane, under **Settings** select **Access keys**. -1. Save aside the values for **Login server**, **Registry name**, **Username**, and **password**. You may use the copy icon at the right of each field to copy the value of that field to the system clipboard. -1. Navigate again to the resource group into which you deployed the resources. +1. In the corner of any portal page, select the menu button, and then select **Resource groups**. +1. In the box with the text **Filter for any field**, enter the first few characters of the resource group that you created previously. If you followed the recommended convention, enter your initials, and then select the appropriate resource group. +1. In the list of resources in the resource group, select the resource with the **Type** value of **Container registry**. +1. On the navigation pane, under **Settings**, select **Access keys**. +1. Save aside the values for **Login server**, **Registry name**, **Username**, and **Password**. You can use the copy icon next to each field to copy the value to the system clipboard. +1. Go back to the resource group into which you deployed the resources. 1. In the **Settings** section, select **Deployments**.-1. Select the bottom-most deployment in the list. The **Deployment name** will match the publisher ID of the offer. It will contain the string `ibm`. -1. In the left pane, select **Outputs**. -1. Using the same copy technique as with the preceding values, save aside the values for the following outputs: +1. Select the bottom-most deployment in the list. The **Deployment name** value matches the publisher ID of the offer. It contains the string `ibm`. +1. On the navigation pane, select **Outputs**. +1. By using the same copy technique as with the preceding values, save aside the values for the following outputs: * `cmdToConnectToCluster`- * `appDeploymentTemplateYaml` if you select **No** to **Deploy an application?** when deploying the Marketplace offer; or `appDeploymentYaml` if you select **yes** to **Deploy an application?**. + * `appDeploymentTemplateYaml` if the deployment doesn't include an application. That is, you selected **No** for **Deploy an application?** when you deployed the Marketplace offer. + * `appDeploymentYaml` if the deployment does include an application. That is, you selected **Yes** for **Deploy an application?**. ### [Bash](#tab/in-bash) - Paste the value of `appDeploymentTemplateYaml` or `appDeploymentYaml` into a Bash shell, append `| grep secretName`, and execute. This command will output the Ingress TLS secret name, such as `- secretName: secret785e2c`. Save aside the value for `secretName` from the output. + Paste the value of `appDeploymentTemplateYaml` or `appDeploymentYaml` into a Bash shell, append `| grep secretName`, and run the command. ++ The output of this command is the ingress TLS secret name, such as `- secretName: secret785e2c`. Save aside the `secretName` value. ### [PowerShell](#tab/in-powershell) - Paste the quoted string in `appDeploymentTemplateYaml` or `appDeploymentYaml` into a PowerShell, append `| ForEach-Object { [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_)) } | Select-String "secretName"`, and execute. This command will output the Ingress TLS secret name, such as `- secretName: secret785e2c`. Save aside the value for `secretName` from the output. + Paste the quoted string in `appDeploymentTemplateYaml` or `appDeploymentYaml` into PowerShell (excluding the `| base64` portion), append `| ForEach-Object { [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_)) } | Select-String "secretName"`, and run the command. - + The output of this command is the ingress TLS secret name, such as `- secretName: secret785e2c`. Save aside the `secretName` value. -These values will be used later in this article. Note that several other useful commands are listed in the outputs. + -> [!NOTE] -> You may notice a similar output named **appDeploymentYaml**. The difference between output *appDeploymentTemplateYaml* and *appDeploymentYaml* is: -> * *appDeploymentTemplateYaml* is populated if and only if the deployment **does not include** an application. -> * *appDeploymentYaml* is populated if and only if the deployment **does include** an application. +You'll use these values later in this article. Note that the outputs list several other useful commands. -## Create an Azure SQL Database +## Create an Azure SQL Database instance [!INCLUDE [create-azure-sql-database](includes/jakartaee/create-azure-sql-database.md)] -Now that the database and AKS cluster have been created, we can proceed to preparing AKS to host your Open Liberty application. +Create an environment variable in your shell for the resource group name for the database: ++### [Bash](#tab/in-bash) ++```bash +export DB_RESOURCE_GROUP_NAME=<db-resource-group> +``` ++### [PowerShell](#tab/in-powershell) ++```powershell +$Env:DB_RESOURCE_GROUP_NAME="<db-resource-group>" +``` ++++Now that you've created the database and AKS cluster, you can proceed to preparing AKS to host your Open Liberty application. ## Configure and deploy the sample application Follow the steps in this section to deploy the sample application on the Liberty ### Check out the application -Clone the sample code for this guide. The sample is on [GitHub](https://github.com/Azure-Samples/open-liberty-on-aks). +Clone the sample code for this article. The sample is on [GitHub](https://github.com/Azure-Samples/open-liberty-on-aks). -There are a few samples in the repository. We'll use *java-app/*. Here's the file structure of the application. +There are a few samples in the repository. This article uses *java-app/*. Run the following commands to get the sample: #### [Bash](#tab/in-bash) git checkout 20240109 -If you see a message about being in "detached HEAD" state, this message is safe to ignore. It just means you have checked out a tag. +If you see a message about being in "detached HEAD" state, you can safely ignore it. The message just means that you checked out a tag. ++Here's the file structure of the application: ``` java-app java-app The directories *java*, *resources*, and *webapp* contain the source code of the sample application. The code declares and uses a data source named `jdbc/JavaEECafeDB`. -In the *aks* directory, there are five deployment files. *db-secret.xml* is used to create [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) with DB connection credentials. The file *openlibertyapplication-agic.yaml* is used in this quickstart to deploy the Open Liberty Application with AGIC. If desired, you can deploy the application without AGIC using the file *openlibertyapplication.yaml*. Use the file *webspherelibertyapplication-agic.yaml* or *webspherelibertyapplication.yaml* to deploy the WebSphere Liberty Application with or without AGIC if you deployed WebSphere Liberty Operator in section [Create a Liberty on AKS deployment using the portal](#create-a-liberty-on-aks-deployment-using-the-portal). +In the *aks* directory, there are five deployment files: -In the *docker* directory, there are two files to create the application image with either Open Liberty or WebSphere Liberty. These files are *Dockerfile* and *Dockerfile-wlp*, respectively. You use the file *Dockerfile* to build the application image with Open Liberty in this quickstart. Similarly, use the file *Dockerfile-wlp* to build the application image with WebSphere Liberty if you deployed WebSphere Liberty Operator in section [Create a Liberty on AKS deployment using the portal](#create-a-liberty-on-aks-deployment-using-the-portal). +* *db-secret.xml*: Use this file to create [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) with database connection credentials. +* *openlibertyapplication-agic.yaml*: Use this file to deploy the Open Liberty application with AGIC. This article assumes that you use this file. +* *openlibertyapplication.yaml*: Use this file if you want to deploy the Open Liberty application without AGIC. +* *webspherelibertyapplication-agic.yaml*: Use this file to deploy the WebSphere Liberty application with AGIC if you deployed WebSphere Liberty Operator [earlier in this article](#create-a-deployment-of-liberty-on-aks-by-using-the-portal). +* *webspherelibertyapplication.yaml*: Use this file to deploy the WebSphere Liberty application without AGIC if you deployed WebSphere Liberty Operator earlier in this article. -In directory *liberty/config*, the *server.xml* file is used to configure the DB connection for the Open Liberty and WebSphere Liberty cluster. +In the *docker* directory, there are two files to create the application image: ++* *Dockerfile*: Use this file to build the application image with Open Liberty in this article. +* *Dockerfile-wlp*: Use this file to build the application image with WebSphere Liberty if you deployed WebSphere Liberty Operator earlier in this article. ++In the *liberty/config* directory, you use the *server.xml* file to configure the database connection for the Open Liberty and WebSphere Liberty cluster. ### Build the project -Now that you've gathered the necessary properties, you can build the application. The POM file for the project reads many variables from the environment. As part of the Maven build, these variables are used to populate values in the YAML files located in *src/main/aks*. You can do something similar for your application outside Maven if you prefer. +Now that you have the necessary properties, you can build the application. The POM file for the project reads many variables from the environment. As part of the Maven build, these variables are used to populate values in the YAML files located in *src/main/aks*. You can do something similar for your application outside Maven if you prefer. #### [Bash](#tab/in-bash) - ```bash cd $BASE_DIR/java-app-# The following variables will be used for deployment file generation into target. +# The following variables are used for deployment file generation into the target. export LOGIN_SERVER=<Azure-Container-Registry-Login-Server-URL> export REGISTRY_NAME=<Azure-Container-Registry-name> export USER_NAME=<Azure-Container-Registry-username> mvn clean install ```powershell cd $env:BASE_DIR\java-app -# The following variables will be used for deployment file generation into target. -$Env:LOGIN_SERVER=<Azure-Container-Registry-Login-Server-URL> -$Env:REGISTRY_NAME=<Azure-Container-Registry-name> -$Env:USER_NAME=<Azure-Container-Registry-username> -$Env:PASSWORD=<Azure-Container-Registry-password> -$Env:DB_SERVER_NAME=<server-name>.database.windows.net -$Env:DB_NAME=<database-name> -$Env:DB_USER=<server-admin-login>@<server-name> -$Env:DB_PASSWORD=<server-admin-password> -$Env:INGRESS_TLS_SECRET=<ingress-TLS-secret-name> +# The following variables are used for deployment file generation into the target. +$Env:LOGIN_SERVER="<Azure-Container-Registry-Login-Server-URL>" +$Env:REGISTRY_NAME="<Azure-Container-Registry-name>" +$Env:USER_NAME="<Azure-Container-Registry-username>" +$Env:PASSWORD="<Azure-Container-Registry-password>" +$Env:DB_SERVER_NAME="<server-name>.database.windows.net" +$Env:DB_NAME="<database-name>" +$Env:DB_USER="<server-admin-login>@<server-name>" +$Env:DB_PASSWORD="<server-admin-password>" +$Env:INGRESS_TLS_SECRET="<ingress-TLS-secret-name>" mvn clean install ``` mvn clean install ### (Optional) Test your project locally -You can now run and test the project locally before deploying to Azure. For convenience, we use the `liberty-maven-plugin`. To learn more about the `liberty-maven-plugin`, see [Building a web application with Maven](https://openliberty.io/guides/maven-intro.html). For your application, you can do something similar using any other mechanism, such as your local IDE. You can also consider using the `liberty:devc` option intended for development with containers. You can read more about `liberty:devc` in the [Liberty docs](https://openliberty.io/docs/latest/development-mode.html#_container_support_for_dev_mode). +Run and test the project locally before deploying to Azure. For convenience, this article uses `liberty-maven-plugin`. To learn more about `liberty-maven-plugin`, see the Open Liberty article [Building a web application with Maven](https://openliberty.io/guides/maven-intro.html). -1. Start the application using `liberty:run`. `liberty:run` will also use the environment variables defined in the previous step. +For your application, you can do something similar by using any other mechanism, such as your local development environment. You can also consider using the `liberty:devc` option intended for development with containers. You can read more about `liberty:devc` in the [Open Liberty documentation](https://openliberty.io/docs/latest/development-mode.html#_container_support_for_dev_mode). ++1. Start the application by using `liberty:run`. `liberty:run` also uses the environment variables that you defined earlier. #### [Bash](#tab/in-bash) You can now run and test the project locally before deploying to Azure. For conv -1. Verify the application works as expected. You should see a message similar to `[INFO] [AUDIT] CWWKZ0003I: The application javaee-cafe updated in 1.930 seconds.` in the command output if successful. Go to `http://localhost:9080/` in your browser and verify the application is accessible and all functions are working. +1. If the test is successful, a message similar to `[INFO] [AUDIT] CWWKZ0003I: The application javaee-cafe updated in 1.930 seconds` appears in the command output. Go to `http://localhost:9080/` in your browser and verify that the application is accessible and all functions are working. -1. Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop. +1. Select <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop. -### Build image for AKS deployment +### Build the image for AKS deployment -You can now run the `docker build` command to build the image. +You can now run the `docker build` command to build the image: #### [Bash](#tab/in-bash) docker build -t javaee-cafe:v1 --pull --file=Dockerfile . ### (Optional) Test the Docker image locally -You can now use the following steps to test the Docker image locally before deploying to Azure. +Use the following steps to test the Docker image locally before deploying to Azure: -1. Run the image using the following command. Note we're using the environment variables defined previously. +1. Run the image by using the following command. This command uses the environment variables that you defined previously. #### [Bash](#tab/in-bash) You can now use the following steps to test the Docker image locally before depl -1. Once the container starts, go to `http://localhost:9080/` in your browser to access the application. +1. After the container starts, go to `http://localhost:9080/` in your browser to access the application. -1. Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop. +1. Select <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop. -### Upload image to ACR +### Upload the image to Azure Container Registry -Upload the built image to the ACR created in the offer. +Upload the built image to the Container Registry instance that you created in the offer: #### [Bash](#tab/in-bash) Use the following steps to deploy and test the application: 1. Connect to the AKS cluster. - Paste the value of **cmdToConnectToCluster** into a Bash shell and execute. + Paste the value of `cmdToConnectToCluster` into a shell and run the command. -1. Apply the DB secret. +1. Apply the database secret: #### [Bash](#tab/in-bash) Use the following steps to deploy and test the application: - You'll see the output `secret/db-secret-sql created`. + The output is `secret/db-secret-sql created`. -1. Apply the deployment file. +1. Apply the deployment file: #### [Bash](#tab/in-bash) Use the following steps to deploy and test the application: - You should see output similar to the following example to indicate that all the pods are running: + Output similar to the following example indicates that all the pods are running: ```output NAME READY STATUS RESTARTS AGE Use the following steps to deploy and test the application: javaee-cafe-cluster-agic-67cdc95bc-h47qm 1/1 Running 0 29s ``` -1. Verify the results. +1. Verify the results: - 1. Get **ADDRESS** of the Ingress resource deployed with the application + 1. Get the address of the ingress resource deployed with the application: #### [Bash](#tab/in-bash) Use the following steps to deploy and test the application: - Copy the value of **ADDRESS** from the output, this is the frontend public IP address of the deployed Azure Application Gateway. + Copy the value of `ADDRESS` from the output. This value is the front-end public IP address of the deployed Application Gateway instance. - 1. Go to `https://<ADDRESS>` to test the application. For your convenience, this shell command will create an environment variable whose value you can paste straight into the browser. + 1. Go to `https://<ADDRESS>` to test the application. For your convenience, this shell command creates an environment variable whose value you can paste straight into the browser: #### [Bash](#tab/in-bash) Use the following steps to deploy and test the application: - If the web page doesn't render correctly or returns a `502 Bad Gateway` error, that's because the app is still starting in the background. Wait for a few minutes and then try again. + If the webpage doesn't render correctly or returns a `502 Bad Gateway` error, the app is still starting in the background. Wait for a few minutes and then try again. ## Clean up resources -To avoid Azure charges, you should clean up unnecessary resources. When the cluster is no longer needed, use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group, container service, container registry, and all related resources. +To avoid Azure charges, you should clean up unnecessary resources. When you no longer need the cluster, use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group, the container service, the container registry, the database, and all related resources: ### [Bash](#tab/in-bash) You can learn more from the following references: * [Azure Kubernetes Service](https://azure.microsoft.com/free/services/kubernetes-service/) * [Open Liberty](https://openliberty.io/) * [Open Liberty Operator](https://github.com/OpenLiberty/open-liberty-operator)-* [Open Liberty Server Configuration](https://openliberty.io/docs/ref/config/) -+* [Open Liberty server configuration](https://openliberty.io/docs/ref/config/) |
aks | Howto Deploy Java Quarkus App | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/howto-deploy-java-quarkus-app.md | Title: "Deploy Quarkus on Azure Kubernetes Service" description: Shows how to quickly stand up Quarkus on Azure Kubernetes Service.-+ Instead of `quarkus dev`, you can accomplish the same thing with Maven by using You may be asked if you want to send telemetry of your usage of Quarkus dev mode. If so, answer as you like. -Quarkus dev mode enables live reload with background compilation. If you modify any aspect of your app source code and refresh your browser, you can see the changes. If there are any issues with compilation or deployment, an error page lets you know. Quarkus dev mode listens for a debugger on port 5005. If you want to wait for the debugger to attach before running, pass `-Dsuspend` on the command line. If you donΓÇÖt want the debugger at all, you can use `-Ddebug=false`. +Quarkus dev mode enables live reload with background compilation. If you modify any aspect of your app source code and refresh your browser, you can see the changes. If there are any issues with compilation or deployment, an error page lets you know. Quarkus dev mode listens for a debugger on port 5005. If you want to wait for the debugger to attach before running, pass `-Dsuspend` on the command line. If you don't want the debugger at all, you can use `-Ddebug=false`. The output should look like the following example: |
aks | Howto Deploy Java Wls App | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/howto-deploy-java-wls-app.md | Title: "Deploy WebLogic Server on Azure Kubernetes Service using the Azure portal" description: Shows how to quickly stand up WebLogic Server on Azure Kubernetes Service.-+ Last updated 02/09/2024 Use the following steps to build the image: => => naming to docker.io/library/model-in-image:WLS-v1 0.2s ``` -1. If you have successfully created the image, then it should now be in your local machineΓÇÖs Docker repository. You can verify the image creation by using the following command: +1. If you have successfully created the image, then it should now be in your local machine's Docker repository. You can verify the image creation by using the following command: ```text docker images model-in-image:WLS-v1 |
aks | Quick Kubernetes Deploy Cli | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/learn/quick-kubernetes-deploy-cli.md | Title: 'Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using Azure CLI' description: Learn how to quickly deploy a Kubernetes cluster and deploy an application in Azure Kubernetes Service (AKS) using Azure CLI. Previously updated : 01/10/2024 Last updated : 04/09/2024 --+ #Customer intent: As a developer or cluster operator, I want to deploy an AKS cluster and deploy an application so I can see how to run applications using the managed Kubernetes service in Azure. # Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using Azure CLI -Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage clusters. In this quickstart, you learn to: +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://go.microsoft.com/fwlink/?linkid=2262758) ++Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage clusters. In this quickstart, you learn how to: - Deploy an AKS cluster using the Azure CLI. - Run a sample multi-container application with a group of microservices and web front ends simulating a retail scenario. This quickstart assumes a basic understanding of Kubernetes concepts. For more i - Make sure that the identity you're using to create your cluster has the appropriate minimum permissions. For more details on access and identity for AKS, see [Access and identity options for Azure Kubernetes Service (AKS)](../concepts-identity.md). - If you have multiple Azure subscriptions, select the appropriate subscription ID in which the resources should be billed using the [az account set](/cli/azure/account#az-account-set) command. -## Create a resource group --An [Azure resource group][azure-resource-group] is a logical group in which Azure resources are deployed and managed. When you create a resource group, you're prompted to specify a location. This location is the storage location of your resource group metadata and where your resources run in Azure if you don't specify another region during resource creation. +## Define environment variables -The following example creates a resource group named *myResourceGroup* in the *eastus* location. +Define the following environment variables for use throughout this quickstart: -Create a resource group using the [az group create][az-group-create] command. +```azurecli-interactive +export RANDOM_ID="$(openssl rand -hex 3)" +export MY_RESOURCE_GROUP_NAME="myAKSResourceGroup$RANDOM_ID" +export REGION="westeurope" +export MY_AKS_CLUSTER_NAME="myAKSCluster$RANDOM_ID" +export MY_DNS_LABEL="mydnslabel$RANDOM_ID" +``` - ```azurecli - az group create --name myResourceGroup --location eastus - ``` +## Create a resource group - The following sample output resembles successful creation of the resource group: +An [Azure resource group][azure-resource-group] is a logical group in which Azure resources are deployed and managed. When you create a resource group, you're prompted to specify a location. This location is the storage location of your resource group metadata and where your resources run in Azure if you don't specify another region during resource creation. - ```output - { - "id": "/subscriptions/<guid>/resourceGroups/myResourceGroup", - "location": "eastus", - "managedBy": null, - "name": "myResourceGroup", - "properties": { - "provisioningState": "Succeeded" - }, - "tags": null - } - ``` +Create a resource group using the [`az group create`][az-group-create] command. ++```azurecli-interactive +az group create --name $MY_RESOURCE_GROUP_NAME --location $REGION +``` ++Results: +<!-- expected_similarity=0.3 --> +```JSON +{ + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myAKSResourceGroupxxxxxx", + "location": "eastus", + "managedBy": null, + "name": "testResourceGroup", + "properties": { + "provisioningState": "Succeeded" + }, + "tags": null, + "type": "Microsoft.Resources/resourceGroups" +} +``` ## Create an AKS cluster -To create an AKS cluster, use the [az aks create][az-aks-create] command. The following example creates a cluster named *myAKSCluster* with one node and enables a system-assigned managed identity. -- ```azurecli - az aks create \ - --resource-group myResourceGroup \ - --name myAKSCluster \ - --enable-managed-identity \ - --node-count 1 \ - --generate-ssh-keys - ``` +Create an AKS cluster using the [`az aks create`][az-aks-create] command. The following example creates a cluster with one node and enables a system-assigned managed identity. - After a few minutes, the command completes and returns JSON-formatted information about the cluster. +```azurecli-interactive +az aks create --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_AKS_CLUSTER_NAME --enable-managed-identity --node-count 1 --generate-ssh-keys +``` - > [!NOTE] - > When you create a new cluster, AKS automatically creates a second resource group to store the AKS resources. For more information, see [Why are two resource groups created with AKS?](../faq.md#why-are-two-resource-groups-created-with-aks) +> [!NOTE] +> When you create a new cluster, AKS automatically creates a second resource group to store the AKS resources. For more information, see [Why are two resource groups created with AKS?](../faq.md#why-are-two-resource-groups-created-with-aks) ## Connect to the cluster -To manage a Kubernetes cluster, use the Kubernetes command-line client, [kubectl][kubectl]. `kubectl` is already installed if you use Azure Cloud Shell. To install `kubectl` locally, call the [az aks install-cli][az-aks-install-cli] command. +To manage a Kubernetes cluster, use the Kubernetes command-line client, [kubectl][kubectl]. `kubectl` is already installed if you use Azure Cloud Shell. To install `kubectl` locally, use the [`az aks install-cli`][az-aks-install-cli] command. 1. Configure `kubectl` to connect to your Kubernetes cluster using the [az aks get-credentials][az-aks-get-credentials] command. This command downloads credentials and configures the Kubernetes CLI to use them. - ```azurecli - az aks get-credentials --resource-group myResourceGroup --name myAKSCluster + ```azurecli-interactive + az aks get-credentials --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_AKS_CLUSTER_NAME ``` 1. Verify the connection to your cluster using the [kubectl get][kubectl-get] command. This command returns a list of the cluster nodes. - ```azurecli + ```azurecli-interactive kubectl get nodes ``` - The following sample output shows the single node created in the previous steps. Make sure the node status is *Ready*. -- ```output - NAME STATUS ROLES AGE VERSION - aks-nodepool1-11853318-vmss000000 Ready agent 2m26s v1.27.7 - ``` - ## Deploy the application To deploy the application, you use a manifest file to create all the objects required to run the [AKS Store application](https://github.com/Azure-Samples/aks-store-demo). A [Kubernetes manifest file][kubernetes-deployment] defines a cluster's desired state, such as which container images to run. The manifest includes the following Kubernetes deployments and To deploy the application, you use a manifest file to create all the objects req If you create and save the YAML file locally, then you can upload the manifest file to your default directory in CloudShell by selecting the **Upload/Download files** button and selecting the file from your local file system. -1. Deploy the application using the [kubectl apply][kubectl-apply] command and specify the name of your YAML manifest. +1. Deploy the application using the [`kubectl apply`][kubectl-apply] command and specify the name of your YAML manifest. - ```azurecli + ```azurecli-interactive kubectl apply -f aks-store-quickstart.yaml ``` - The following sample output shows the deployments and -- ```output - deployment.apps/rabbitmq created - service/rabbitmq created - deployment.apps/order-service created - service/order-service created - deployment.apps/product-service created - service/product-service created - deployment.apps/store-front created - service/store-front created - ``` - ## Test the application -When the application runs, a Kubernetes service exposes the application front end to the internet. This process can take a few minutes to complete. --1. Check the status of the deployed pods using the [kubectl get pods][kubectl-get] command. Make sure all pods are `Running` before proceeding. -- ```console - kubectl get pods - ``` --1. Check for a public IP address for the store-front application. Monitor progress using the [kubectl get service][kubectl-get] command with the `--watch` argument. -- ```azurecli - kubectl get service store-front --watch - ``` -- The **EXTERNAL-IP** output for the `store-front` service initially shows as *pending*: -- ```output - NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE - store-front LoadBalancer 10.0.100.10 <pending> 80:30025/TCP 4h4m - ``` --1. Once the **EXTERNAL-IP** address changes from *pending* to an actual public IP address, use `CTRL-C` to stop the `kubectl` watch process. -- The following sample output shows a valid public IP address assigned to the service: -- ```output - NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE - store-front LoadBalancer 10.0.100.10 20.62.159.19 80:30025/TCP 4h5m - ``` --1. Open a web browser to the external IP address of your service to see the Azure Store app in action. -- :::image type="content" source="media/quick-kubernetes-deploy-cli/aks-store-application.png" alt-text="Screenshot of AKS Store sample application." lightbox="media/quick-kubernetes-deploy-cli/aks-store-application.png"::: +You can validate that the application is running by visiting the public IP address or the application URL. ++Get the application URL using the following commands: ++```azurecli-interactive +runtime="5 minute" +endtime=$(date -ud "$runtime" +%s) +while [[ $(date -u +%s) -le $endtime ]] +do + STATUS=$(kubectl get pods -l app=store-front -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') + echo $STATUS + if [ "$STATUS" == 'True' ] + then + export IP_ADDRESS=$(kubectl get service store-front --output 'jsonpath={..status.loadBalancer.ingress[0].ip}') + echo "Service IP Address: $IP_ADDRESS" + break + else + sleep 10 + fi +done +``` ++```azurecli-interactive +curl $IP_ADDRESS +``` ++Results: +<!-- expected_similarity=0.3 --> +```JSON +<!doctype html> +<html lang=""> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width,initial-scale=1"> + <link rel="icon" href="/favicon.ico"> + <title>store-front</title> + <script defer="defer" src="/js/chunk-vendors.df69ae47.js"></script> + <script defer="defer" src="/js/app.7e8cfbb2.js"></script> + <link href="/css/app.a5dc49f6.css" rel="stylesheet"> + </head> + <body> + <div id="app"></div> + </body> +</html> +``` ++```JSON +echo "You can now visit your web server at $IP_ADDRESS" +``` + ## Delete the cluster -If you don't plan on going through the [AKS tutorial][aks-tutorial], clean up unnecessary resources to avoid Azure charges. Call the [az group delete][az-group-delete] command to remove the resource group, container service, and all related resources. -- ```azurecli - az group delete --name myResourceGroup --yes --no-wait - ``` +If you don't plan on going through the [AKS tutorial][aks-tutorial], clean up unnecessary resources to avoid Azure charges. You can remove the resource group, container service, and all related resources using the [`az group delete`][az-group-delete] command. - > [!NOTE] - > The AKS cluster was created with a system-assigned managed identity, which is the default identity option used in this quickstart. The platform manages this identity so you don't need to manually remove it. +> [!NOTE] +> The AKS cluster was created with a system-assigned managed identity, which is the default identity option used in this quickstart. The platform manages this identity so you don't need to manually remove it. ## Next steps To learn more about AKS and walk through a complete code-to-deployment example, [kubernetes-deployment]: ../concepts-clusters-workloads.md#deployments-and-yaml-manifests [aks-solution-guidance]: /azure/architecture/reference-architectures/containers/aks-start-here?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json [baseline-reference-architecture]: /azure/architecture/reference-architectures/containers/aks/baseline-aks?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json- |
aks | Quick Windows Container Deploy Cli | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/learn/quick-windows-container-deploy-cli.md | To learn more about AKS, and to walk through a complete code-to-deployment examp [az-group-create]: /cli/azure/group#az_group_create [aks-solution-guidance]: /azure/architecture/reference-architectures/containers/aks-start-here?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json [kubernetes-deployment]: ../concepts-clusters-workloads.md#deployments-and-yaml-manifests-[kubernetes-service]: ../concepts-network.md#services +[kubernetes-service]: ../concepts-network-services.md [windows-server-password]: /windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements#reference [win-faq-change-admin-creds]: ../windows-faq.md#how-do-i-change-the-administrator-password-for-windows-server-nodes-on-my-cluster [baseline-reference-architecture]: /azure/architecture/reference-architectures/containers/aks/baseline-aks?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json |
aks | Quick Windows Container Deploy Portal | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/learn/quick-windows-container-deploy-portal.md | To learn more about AKS, and to walk through a complete code-to-deployment examp [az-aks-get-credentials]: /cli/azure/aks#az_aks_get_credentials [azure-portal]: https://portal.azure.com [kubernetes-deployment]: ../concepts-clusters-workloads.md#deployments-and-yaml-manifests-[kubernetes-service]: ../concepts-network.md#services +[kubernetes-service]: ../concepts-network-services.md [preset-config]: ../quotas-skus-regions.md#cluster-configuration-presets-in-the-azure-portal [import-azakscredential]: /powershell/module/az.aks/import-azakscredential [baseline-reference-architecture]: /azure/architecture/reference-architectures/containers/aks/baseline-aks?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json |
aks | Quick Windows Container Deploy Powershell | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/learn/quick-windows-container-deploy-powershell.md | To learn more about AKS, and to walk through a complete code-to-deployment examp [new-azakscluster]: /powershell/module/az.aks/new-azakscluster [import-azakscredential]: /powershell/module/az.aks/import-azakscredential [kubernetes-deployment]: ../concepts-clusters-workloads.md#deployments-and-yaml-manifests-[kubernetes-service]: ../concepts-network.md#services +[kubernetes-service]: ../concepts-network-services.md [aks-tutorial]: ../tutorial-kubernetes-prepare-app.md [aks-solution-guidance]: /azure/architecture/reference-architectures/containers/aks-start-here?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json [windows-server-password]: /windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements#reference |
aks | Manage Abort Operations | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/manage-abort-operations.md | -Sometimes deployment or other processes running within pods on nodes in a cluster can run for periods of time longer than expected due to various reasons. While it's important to allow those processes to gracefully terminate when they're no longer needed, there are circumstances where you need to release control of node pools and clusters with long running operations using an *abort* command. +Sometimes deployment or other processes running within pods on nodes in a cluster can run for periods of time longer than expected due to various reasons. You can get insight into the progress of any ongoing operation, such as create, upgrade, and scale, using any preview API version after `2024-01-02-preview` using the following az rest command: ++```azurecli-interactive +export ResourceID="You cluster ResourceID" +az rest --method get --url "https://management.azure.com$ResourceID/operations/latest?api-version=2024-01-02-preview" +``` ++This command provides you with a percentage that indicates how close the operation is to completion. You can use this method to get these insights for up to 50 of the latest operations on your cluster. The "percentComplete" attribute denotes the extent of completion for the ongoing operation, as shown in the following example: ++```azurecli-interactive +"id": "/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourcegroups/testStatus/providers/Microsoft.ContainerService/managedClusters/contoso/operations/fc10e97d-b7a8-4a54-84de-397c45f322e1", + "name": "fc10e97d-b7a8-4a54-84de-397c45f322e1", + "percentComplete": 10, + "startTime": "2024-04-08T18:21:31Z", + "status": "InProgress" +``` ++While it's important to allow operations to gracefully terminate when they're no longer needed, there are circumstances where you need to release control of node pools and clusters with long running operations using an *abort* command. AKS support for aborting long running operations is now generally available. This feature allows you to take back control and run another operation seamlessly. This design is supported using the [Azure REST API](/rest/api/azure/) or the [Azure CLI](/cli/azure/). |
aks | Supported Kubernetes Versions | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/supported-kubernetes-versions.md | For the past release history, see [Kubernetes history](https://github.com/kubern | K8s version | Upstream release | AKS preview | AKS GA | End of life | Platform support | |--|-|--||-|--|-| 1.25 | Aug 2022 | Oct 2022 | Dec 2022 | Jan 14, 2024 | Until 1.29 GA | | 1.26 | Dec 2022 | Feb 2023 | Apr 2023 | Mar 2024 | Until 1.30 GA | | 1.27* | Apr 2023 | Jun 2023 | Jul 2023 | Jul 2024, LTS until Jul 2025 | Until 1.31 GA | | 1.28 | Aug 2023 | Sep 2023 | Nov 2023 | Nov 2024 | Until 1.32 GA| | 1.29 | Dec 2023 | Feb 2024 | Mar 2024 | | Until 1.33 GA |+| 1.30 | Apr 2024 | May 2024 | Jun 2024 | | Until 1.34 GA | *\* Indicates the version is designated for Long Term Support* Note the following important changes before you upgrade to any of the available |Kubernetes Version | AKS Managed Addons | AKS Components | OS components | Breaking Changes | Notes |--||-||-||-| 1.25 | Azure policy 1.0.1<br>Metrics-Server 0.6.3<br>KEDA 2.9.3<br>Open Service Mesh 1.2.3<br>Core DNS V1.9.4<br>Overlay VPA 0.11.0<br>Azure-Keyvault-SecretsProvider 1.4.1<br>Application Gateway Ingress Controller (AGIC) 1.5.3<br>Image Cleaner v1.1.1<br>Azure Workload identity v1.0.0<br>MDC Defender 1.0.56<br>Azure Active Directory Pod Identity 1.8.13.6<br>GitOps 1.7.0<br>KMS 0.5.0| Cilium 1.12.8<br>CNI 1.4.44<br> Cluster Autoscaler 1.8.5.3<br> | OS Image Ubuntu 18.04 Cgroups V1 <br>ContainerD 1.7<br>Azure Linux 2.0<br>Cgroups V1<br>ContainerD 1.6<br>| Ubuntu 22.04 by default with cgroupv2 and Overlay VPA 0.13.0 |CgroupsV2 - If you deploy Java applications with the JDK, prefer to use JDK 11.0.16 and later or JDK 15 and later, which fully support cgroup v2 | 1.26 | Azure policy 1.3.0<br>Metrics-Server 0.6.3<br>KEDA 2.10.1<br>Open Service Mesh 1.2.3<br>Core DNS V1.9.4<br>Overlay VPA 0.11.0<br>Azure-Keyvault-SecretsProvider 1.4.1<br>Application Gateway Ingress Controller (AGIC) 1.5.3<br>Image Cleaner v1.2.3<br>Azure Workload identity v1.0.0<br>MDC Defender 1.0.56<br>Azure Active Directory Pod Identity 1.8.13.6<br>GitOps 1.7.0<br>KMS 0.5.0<br>azurefile-csi-driver 1.26.10<br>| Cilium 1.12.8<br>CNI 1.4.44<br> Cluster Autoscaler 1.8.5.3<br> | OS Image Ubuntu 22.04 Cgroups V2 <br>ContainerD 1.7<br>Azure Linux 2.0<br>Cgroups V1<br>ContainerD 1.6<br>|azurefile-csi-driver 1.26.10 |None | 1.27 | Azure policy 1.3.0<br>azuredisk-csi driver v1.28.5<br>azurefile-csi driver v1.28.7<br>blob-csi v1.22.4<br>csi-attacher v4.3.0<br>csi-resizer v1.8.0<br>csi-snapshotter v6.2.2<br>snapshot-controller v6.2.2<br>Metrics-Server 0.6.3<br>Keda 2.11.2<br>Open Service Mesh 1.2.3<br>Core DNS V1.9.4<br>Overlay VPA 0.11.0<br>Azure-Keyvault-SecretsProvider 1.4.1<br>Application Gateway Ingress Controller (AGIC) 1.7.2<br>Image Cleaner v1.2.3<br>Azure Workload identity v1.0.0<br>MDC Defender 1.0.56<br>Azure Active Directory Pod Identity 1.8.13.6<br>GitOps 1.7.0<br>azurefile-csi-driver 1.28.7<br>KMS 0.5.0<br>CSI Secret store driver 1.3.4-1<br>|Cilium 1.13.10-1<br>CNI 1.4.44<br> Cluster Autoscaler 1.8.5.3<br> | OS Image Ubuntu 22.04 Cgroups V2 <br>ContainerD 1.7 for Linux and 1.6 for Windows<br>Azure Linux 2.0<br>Cgroups V1<br>ContainerD 1.6<br>|Keda 2.11.2<br>Cilium 1.13.10-1<br>azurefile-csi-driver 1.28.7<br>azuredisk-csi driver v1.28.5<br>blob-csi v1.22.4<br>csi-attacher v4.3.0<br>csi-resizer v1.8.0<br>csi-snapshotter v6.2.2<br>snapshot-controller v6.2.2|Because of Ubuntu 22.04 FIPS certification status, we'll switch AKS FIPS nodes from 18.04 to 20.04 from 1.27 onwards. | 1.28 | Azure policy 1.3.0<br>azurefile-csi-driver 1.29.2<br>csi-node-driver-registrar v2.9.0<br>csi-livenessprobe 2.11.0<br>azuredisk-csi-linux v1.29.2<br>azuredisk-csi-windows v1.29.2<br>csi-provisioner v3.6.2<br>csi-attacher v4.5.0<br>csi-resizer v1.9.3<br>csi-snapshotter v6.2.2<br>snapshot-controller v6.2.2<br>Metrics-Server 0.6.3<br>KEDA 2.11.2<br>Open Service Mesh 1.2.7<br>Core DNS V1.9.4<br>Overlay VPA 0.13.0<br>Azure-Keyvault-SecretsProvider 1.4.1<br>Application Gateway Ingress Controller (AGIC) 1.7.2<br>Image Cleaner v1.2.3<br>Azure Workload identity v1.2.0<br>MDC Defender Security Publisher 1.0.68<br>CSI Secret store driver 1.3.4-1<br>MDC Defender Old File Cleaner 1.3.68<br>MDC Defender Pod Collector 1.0.78<br>MDC Defender Low Level Collector 1.3.81<br>Azure Active Directory Pod Identity 1.8.13.6<br>GitOps 1.8.1|Cilium 1.13.10-1<br>CNI v1.4.43.1 (Default)/v1.5.11 (Azure CNI Overlay)<br> Cluster Autoscaler 1.27.3<br>Tigera-Operator 1.28.13| OS Image Ubuntu 22.04 Cgroups V2 <br>ContainerD 1.7.5 for Linux and 1.7.1 for Windows<br>Azure Linux 2.0<br>Cgroups V1<br>ContainerD 1.6<br>|azurefile-csi-driver 1.29.2<br>csi-resizer v1.9.3<br>csi-attacher v4.4.2<br>csi-provisioner v4.4.2<br>blob-csi v1.23.2<br>azurefile-csi driver v1.29.2<br>azuredisk-csi driver v1.29.2<br>csi-livenessprobe v2.11.0<br>csi-node-driver-registrar v2.9.0|None New Supported Version List Platform support policy is a reduced support plan for certain unsupported Kubernetes versions. During platform support, customers only receive support from Microsoft for AKS/Azure platform related issues. Any issues related to Kubernetes functionality and components aren't supported. -Platform support policy applies to clusters in an n-3 version (where n is the latest supported AKS GA minor version), before the cluster drops to n-4. For example, Kubernetes v1.25 is considered platform support when v1.28 is the latest GA version. However, during the v1.29 GA release, v1.25 will then auto-upgrade to v1.26. If you are a running an n-2 version, the moment it becomes n-3 it also becomes deprecated, and you enter into the platform support policy. +Platform support policy applies to clusters in an n-3 version (where n is the latest supported AKS GA minor version), before the cluster drops to n-4. For example, Kubernetes v1.26 is considered platform support when v1.29 is the latest GA version. However, during the v1.30 GA release, v1.26 will then auto-upgrade to v1.27. If you are a running an n-2 version, the moment it becomes n-3 it also becomes deprecated, and you enter into the platform support policy. AKS relies on the releases and patches from [Kubernetes](https://kubernetes.io/releases/), which is an Open Source project that only supports a sliding window of three minor versions. AKS can only guarantee [full support](#kubernetes-version-support-policy) while those versions are being serviced upstream. Since there's no more patches being produced upstream, AKS can either leave those versions unpatched or fork. Due to this limitation, platform support doesn't support anything from relying on Kubernetes upstream. For minor versions not supported by AKS, scaling in or out should continue to wo The control plane must be within a window of versions from all node pools. For details on upgrading the control plane or node pools, visit documentation on [upgrading node pools](manage-node-pools.md#upgrade-a-cluster-control-plane-with-multiple-node-pools). +### What is the allowed difference in versions between control plane and node pool? +The [version skew policy](https://kubernetes.io/releases/version-skew-policy/) now allows a difference of upto 3 versions between control plane and agent pools. AKS follows this skew version policy change starting from version 1.28 onwards. + ### Can I skip multiple AKS versions during cluster upgrade? When you upgrade a supported AKS cluster, Kubernetes minor versions can't be skipped. Kubernetes control planes [version skew policy](https://kubernetes.io/releases/version-skew-policy/) doesn't support minor version skipping. For example, upgrades between: To upgrade from *1.12.x* -> *1.14.x*: Skipping multiple versions can only be done when upgrading from an unsupported version back into the minimum supported version. For example, you can upgrade from an unsupported *1.10.x* to a supported *1.15.x* if *1.15* is the minimum supported minor version. -When performing an upgrade from an _unsupported version_ that skips two or more minor versions, the upgrade is performed without any guarantee of functionality and is excluded from the service-level agreements and limited warranty. If your version is significantly out of date, we recommend that you re-create the cluster. +When performing an upgrade from an _unsupported version_ that skips two or more minor versions, the upgrade is performed without any guarantee of functionality and is excluded from the service-level agreements and limited warranty.Clusters running _unsupported version_ has the flexibility of decoupling control plane upgrades with node pool upgrades. However if your version is significantly out of date, we recommend that you re-create the cluster. ### Can I create a new 1.xx.x cluster during its 30 day support window? No. Once a version is deprecated/removed, you can't create a cluster with that v ### I'm on a freshly deprecated version, can I still add new node pools? Or will I have to upgrade? -No. You aren't allowed to add node pools of the deprecated version to your cluster. You can add node pools of a new version, but it might require you to update the control plane first. +No. You aren't allowed to add node pools of the deprecated version to your cluster. Creation or upgrade of node pools upto the _unsupported version_ control plane version is allowed , irrespective of version difference between node pool and the control plane. Only alias minor upgrades are allowed. ### How often do you update patches? For information on how to upgrade your cluster, see: [get-azaksversion]: /powershell/module/az.aks/get-azaksversion [aks-tracker]: release-tracker.md [fleet-multi-cluster-upgrade]: /azure/kubernetes-fleet/update-orchestration- |
aks | Upgrade Aks Cluster | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/aks/upgrade-aks-cluster.md | When you perform an upgrade from an *unsupported version* that skips two or more * If you're using the Azure CLI, this article requires Azure CLI version 2.34.1 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install]. * If you're using Azure PowerShell, this article requires Azure PowerShell version 5.9.0 or later. Run `Get-InstalledModule -Name Az` to find the version. If you need to install or upgrade, see [Install Azure PowerShell][azure-powershell-install]. * Performing upgrade operations requires the `Microsoft.ContainerService/managedClusters/agentPools/write` RBAC role. For more on Azure RBAC roles, see the [Azure resource provider operations][azure-rp-operations].+* Starting with 1.30 kubernetes version and 1.27 LTS versions the beta apis will be disabled by default when you upgrade to them. > [!WARNING] > An AKS cluster upgrade triggers a cordon and drain of your nodes. If you have a low compute quota available, the upgrade might fail. For more information, see [increase quotas](../azure-portal/supportability/regional-quota-requests.md). |
api-center | Use Vscode Extension | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/api-center/use-vscode-extension.md | The following Visual Studio Code extensions are optional and needed only for cer * [REST client extension](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) - to send HTTP requests and view the responses in Visual Studio Code directly * [Microsoft Kiota extension](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota) - to generate API clients-+* [Spectral extension](https://marketplace.visualstudio.com/items?itemName=stoplight.spectral) - to run shift-left API design conformance checks in Visual Studio Code ## Setup |
api-management | Api Management Gateways Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/api-management/api-management-gateways-overview.md | The following tables compare features available in the following API Management | [Multi-region deployment](api-management-howto-deploy-multi-region.md) | Premium | ❌ | ❌ | ✔️<sup>1</sup> | | [CA root certificates](api-management-howto-ca-certificates.md) for certificate validation | ✔️ | ✔️ | ❌ | ✔️<sup>3</sup> | | [CA root certificates](api-management-howto-ca-certificates.md) for certificate validation | ✔️ | ✔️ | ❌ | ✔️<sup>3</sup> | -| [Managed domain certificates](configure-custom-domain.md?tabs=managed#domain-certificate-options) | Developer, Basic, Standard, Premium | ✔️ | ✔️ | ❌ | +| [Managed domain certificates](configure-custom-domain.md?tabs=managed#domain-certificate-options) | Developer, Basic, Standard, Premium | ✔️ | ❌ | ❌ | | [TLS settings](api-management-howto-manage-protocols-ciphers.md) | ✔️ | ✔️ | ✔️ | ✔️ | | **HTTP/2** (Client-to-gateway) | ✔️<sup>4</sup> | ✔️<sup>4</sup> |❌ | ✔️ | | **HTTP/2** (Gateway-to-backend) | ❌ | ❌ | ❌ | ✔️ | |
api-management | How To Deploy Self Hosted Gateway Azure Kubernetes Service | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/api-management/how-to-deploy-self-hosted-gateway-azure-kubernetes-service.md | This article provides the steps for deploying self-hosted gateway component of A 5. Make sure **Kubernetes** is selected under **Deployment scripts**. 6. Select **\<gateway-name\>.yml** file link next to **Deployment** to download the file. 7. Adjust the `config.service.endpoint`, port mappings, and container name in the .yml file as needed.-8. Depending on your scenario, you might need to change the [service type](../aks/concepts-network.md#services). +8. Depending on your scenario, you might need to change the [service type](../aks/concepts-network-services.md). * The default value is `LoadBalancer`, which is the external load balancer. * You can use the [internal load balancer](../aks/internal-lb.md) to restrict the access to the self-hosted gateway to only internal users. * The sample below uses `NodePort`. |
api-management | Validate Azure Ad Token Policy | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/api-management/validate-azure-ad-token-policy.md | The `validate-azure-ad-token` policy enforces the existence and validity of a JS | - | -- | -- | | audiences | Contains a list of acceptable audience claims that can be present on the token. If multiple `audience` values are present, then each value is tried until either all are exhausted (in which case validation fails) or until one succeeds. Policy expressions are allowed. | No | | backend-application-ids | Contains a list of acceptable backend application IDs. This is only required in advanced cases for the configuration of options and can generally be removed. Policy expressions aren't allowed. | No |-| client-application-ids | Contains a list of acceptable client application IDs. If multiple `application-id` elements are present, then each value is tried until either all are exhausted (in which case validation fails) or until one succeeds. If a client application ID isn't provided, one or more `audience` claims should be specified. Policy expressions aren't allowed. | No | +| client-application-ids | Contains a list of acceptable client application IDs. If multiple `application-id` elements are present, then each value is tried until either all are exhausted (in which case validation fails) or until one succeeds. If a client application ID isn't provided, one or more `audience` claims should be specified. Policy expressions aren't allowed. | Yes | | required-claims | Contains a list of `claim` elements for claim values expected to be present on the token for it to be considered valid. When the `match` attribute is set to `all`, every claim value in the policy must be present in the token for validation to succeed. When the `match` attribute is set to `any`, at least one claim must be present in the token for validation to succeed. Policy expressions are allowed. | No | ### claim attributes |
app-service | Configure Custom Container | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/configure-custom-container.md | This article shows you how to configure a custom container to run on Azure App S ::: zone pivot="container-windows" -This guide provides key concepts and instructions for containerization of Windows apps in App Service. If you've never used Azure App Service, follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md) first. +This guide provides key concepts and instructions for containerization of Windows apps in App Service. New Azure App Service users should follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md) first. ::: zone-end ::: zone pivot="container-linux" -This guide provides key concepts and instructions for containerization of Linux apps in App Service. If you've never used Azure App Service, follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md) first. There's also a [multi-container app quickstart](quickstart-multi-container.md) and [tutorial](tutorial-multi-container-app.md). For sidecar containers (preview), see [Tutorial: Configure a sidecar container for custom container in Azure App Service (preview)](tutorial-custom-container-sidecar.md). +This guide provides key concepts and instructions for containerization of Linux apps in App Service. If are new to Azure App Service, follow the [custom container quickstart](quickstart-custom-container.md) and [tutorial](tutorial-custom-container.md) first. There's also a [multi-container app quickstart](quickstart-multi-container.md) and [tutorial](tutorial-multi-container-app.md). For sidecar containers (preview), see [Tutorial: Configure a sidecar container for custom container in Azure App Service (preview)](tutorial-custom-container-sidecar.md). ::: zone-end For *\<username>* and *\<password>*, supply the sign-in credentials for your pri ## Use managed identity to pull image from Azure Container Registry -Use the following steps to configure your web app to pull from ACR using managed identity. The steps use system-assigned managed identity, but you can use user-assigned managed identity as well. +Use the following steps to configure your web app to pull from Azure Container Registry (ACR) using managed identity. The steps use system-assigned managed identity, but you can use user-assigned managed identity as well. 1. Enable [the system-assigned managed identity](./overview-managed-identity.md) for the web app by using the [`az webapp identity assign`](/cli/azure/webapp/identity#az-webapp-identity-assign) command: ```azurecli-interactive az webapp identity assign --resource-group <group-name> --name <app-name> --query principalId --output tsv ```- Replace `<app-name>` with the name you used in the previous step. The output of the command (filtered by the `--query` and `--output` arguments) is the service principal ID of the assigned identity, which you use shortly. + Replace `<app-name>` with the name you used in the previous step. The output of the command (filtered by the `--query` and `--output` arguments) is the service principal ID of the assigned identity. 1. Get the resource ID of your Azure Container Registry: ```azurecli-interactive az acr show --resource-group <group-name> --name <registry-name> --query id --output tsv Use the following steps to configure your web app to pull from ACR using managed - `<app-name>` with the name of your web app. >[!Tip] > If you are using PowerShell console to run the commands, you need to escape the strings in the `--generic-configurations` argument in this and the next step. For example: `--generic-configurations '{\"acrUseManagedIdentityCreds\": true'`-1. (Optional) If your app uses a [user-assigned managed identity](overview-managed-identity.md#add-a-user-assigned-identity), make sure this is configured on the web app and then set the `acrUserManagedIdentityID` property to specify its client ID: +1. (Optional) If your app uses a [user-assigned managed identity](overview-managed-identity.md#add-a-user-assigned-identity), make sure the identity is configured on the web app and then set the `acrUserManagedIdentityID` property to specify its client ID: ```azurecli-interactive az identity show --resource-group <group-name> --name <identity-name> --query clientId --output tsv You're all set, and the web app now uses managed identity to pull from Azure Con ## Use an image from a network protected registry -To connect and pull from a registry inside a virtual network or on-premises, your app must integrate with a virtual network. This is also needed for Azure Container Registry with private endpoint. When your network and DNS resolution is configured, you enable the routing of the image pull through the virtual network by configuring the `vnetImagePullEnabled` site setting: +To connect and pull from a registry inside a virtual network or on-premises, your app must integrate with a virtual network (VNET). VNET integration is also needed for Azure Container Registry with private endpoint. When your network and DNS resolution is configured, you enable the routing of the image pull through the virtual network by configuring the `vnetImagePullEnabled` site setting: ```azurecli-interactive az resource update --resource-group <group-name> --name <app-name> --resource-type "Microsoft.Web/sites" --set properties.vnetImagePullEnabled [true|false] You can connect to your Windows container directly for diagnostic tasks by navig - It functions separately from the graphical browser above it, which only shows the files in your [shared storage](#use-persistent-shared-storage). - In a scaled-out app, the SSH session is connected to one of the container instances. You can select a different instance from the **Instance** dropdown in the top Kudu menu.-- Any change you make to the container from within the SSH session does *not* persist when your app is restarted (except for changes in the shared storage), because it's not part of the Docker image. To persist your changes, such as registry settings and software installation, make them part of the Dockerfile.+- Any change you make to the container from within the SSH session **doesn't** persist when your app is restarted (except for changes in the shared storage), because it's not part of the Docker image. To persist your changes, such as registry settings and software installation, make them part of the Dockerfile. ## Access diagnostic logs App Service logs actions by the Docker host and activities from within the cont There are several ways to access Docker logs: -- [In the Azure portal](#in-azure-portal)-- [From Kudu](#from-kudu)-- [With the Kudu API](#with-the-kudu-api)-- [Send logs to Azure monitor](troubleshoot-diagnostic-logs.md#send-logs-to-azure-monitor)+- [Azure portal](#in-azure-portal) +- [Kudu](#from-kudu) +- [Kudu API](#with-the-kudu-api) +- [Azure monitor](troubleshoot-diagnostic-logs.md#send-logs-to-azure-monitor) ### In Azure portal Docker logs are displayed in the portal, in the **Container Settings** page of y ### From Kudu -Navigate to `https://<app-name>.scm.azurewebsites.net/DebugConsole` and select the **LogFiles** folder to see the individual log files. To download the entire **LogFiles** directory, select the **Download** icon to the left of the directory name. You can also access this folder using an FTP client. +Navigate to `https://<app-name>.scm.azurewebsites.net/DebugConsole` and select the **LogFiles** folder to see the individual log files. To download the entire **LogFiles** directory, select the **"Download"** icon to the left of the directory name. You can also access this folder using an FTP client. In the SSH terminal, you can't access the `C:\home\LogFiles` folder by default because persistent shared storage isn't enabled. To enable this behavior in the console terminal, [enable persistent shared storage](#use-persistent-shared-storage). To download all the logs together in one ZIP file, access `https://<app-name>.sc ## Customize container memory -By default all Windows Containers deployed in Azure App Service have a memory limit configured. The following table lists the default settings per App Service Plan SKU. +By default all Windows Containers deployed in Azure App Service have a memory limit configured. The following table lists the default settings per App Service Plan SKU. | App Service Plan SKU | Default memory limit per app in MB | |-|-| In PowerShell: Set-AzWebApp -ResourceGroupName <group-name> -Name <app-name> -AppSettings @{"WEBSITE_MEMORY_LIMIT_MB"=2000} ``` -The value is defined in MB and must be less and equal to the total physical memory of the host. For example, in an App Service plan with 8GB RAM, the cumulative total of `WEBSITE_MEMORY_LIMIT_MB` for all the apps must not exceed 8 GB. Information on how much memory is available for each pricing tier can be found in [App Service pricing](https://azure.microsoft.com/pricing/details/app-service/windows/), in the **Premium v3 service plan** section. +The value is defined in MB and must be less and equal to the total physical memory of the host. For example, in an App Service plan with 8 GB RAM, the cumulative total of `WEBSITE_MEMORY_LIMIT_MB` for all the apps must not exceed 8 GB. Information on how much memory is available for each pricing tier can be found in [App Service pricing](https://azure.microsoft.com/pricing/details/app-service/windows/), in the **Premium v3 service plan** section. ## Customize the number of compute cores The processors might be multicore or hyperthreading processors. Information on h ## Customize health ping behavior -App Service considers a container to be successfully started when the container starts and responds to an HTTP ping. The health ping request contains the header `User-Agent= "App Service Hyper-V Container Availability Check"`. If the container starts but doesn't respond to a ping after a certain amount of time, App Service logs an event in the Docker log, saying that the container didn't start. +App Service considers a container to be successfully started when the container starts and responds to an HTTP ping. The health ping request contains the header `User-Agent= "App Service Hyper-V Container Availability Check"`. If the container starts but doesn't respond pings after a certain amount of time, App Service logs an event in the Docker log, saying that the container didn't start. If your application is resource-intensive, the container might not respond to the HTTP ping in time. To control the actions when HTTP pings fail, set the `CONTAINER_AVAILABILITY_CHECK_MODE` app setting. You can set it via the [Cloud Shell](https://shell.azure.com). In Bash: Secure Shell (SSH) is commonly used to execute administrative commands remotely 4. Rebuild and push the Docker image to the registry, and then test the Web App SSH feature on Azure portal. -Further troubleshooting information is available at the Azure App Service OSS blog: [Enabling SSH on Linux Web App for Containers](https://azureossd.github.io/2022/04/27/2022-Enabling-SSH-on-Linux-Web-App-for-Containers/https://docsupdatetracker.net/index.html#troubleshooting) +Further troubleshooting information is available at the Azure App Service blog: [Enabling SSH on Linux Web App for Containers](https://azureossd.github.io/2022/04/27/2022-Enabling-SSH-on-Linux-Web-App-for-Containers/https://docsupdatetracker.net/index.html#troubleshooting) ## Access diagnostic logs In your *docker-compose.yml* file, map the `volumes` option to `${WEBAPP_STORAGE wordpress: image: <image name:tag> volumes:- - ${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html - - ${WEBAPP_STORAGE_HOME}/phpmyadmin:/var/www/phpmyadmin - - ${WEBAPP_STORAGE_HOME}/LogFiles:/var/log + - "${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html" + - "${WEBAPP_STORAGE_HOME}/phpmyadmin:/var/www/phpmyadmin" + - "${WEBAPP_STORAGE_HOME}/LogFiles:/var/log" ``` ### Preview limitations The following lists show supported and unsupported Docker Compose configuration - "version x.x" always needs to be the first YAML statement in the file - ports section must use quoted numbers-- image > volume section must be quoted and cannot have permissions definitions+- image > volume section must be quoted and can't have permissions definitions - volumes section must not have an empty curly brace after the volume name > [!NOTE] |
app-service | How To Migrate | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/environment/how-to-migrate.md | At this time, detailed migration statuses are available only when you're using t When migration is complete, you have an App Service Environment v3 resource, and all of your apps are running in your new environment. You can confirm the environment's version by checking the **Configuration** page for your App Service Environment. -If your migration included a custom domain suffix, the domain appeared in the **Essentials** section of the **Overview** page of the portal for App Service Environment v1/v2, but it no longer appears there in App Service Environment v3. Instead, for App Service Environment v3, go to the **Custom domain suffix** page to confirm that your custom domain suffix is configured correctly. You can also remove the configuration if you no longer need it or configure one if you didn't have one previously. +If your migration includes a custom domain suffix, the domain appeared in the **Essentials** section of the **Overview** page of the portal for App Service Environment v1/v2, but it no longer appears there in App Service Environment v3. Instead, for App Service Environment v3, go to the **Custom domain suffix** page to confirm that your custom domain suffix is configured correctly. You can also remove the configuration if you no longer need it or configure one if you didn't have one previously. :::image type="content" source="./media/migration/custom-domain-suffix-app-service-environment-v3.png" alt-text="Screenshot that shows the page for custom domain suffix configuration for App Service Environment v3."::: ::: zone-end +> [!NOTE] +> If your migration includes a custom domain suffix, your custom domain suffix configuration might show as degraded once the migration is complete due to a known bug. Your App Service Environment should still function as expected. The degraded status should resolve itself within 6-8 hours. If the configuration is degraded after 8 hours or if your custom domain suffix isn't functioning, contact support. +> +> + ## Next steps > [!div class="nextstepaction"] |
app-service | How To Side By Side Migrate | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/environment/how-to-side-by-side-migrate.md | description: Learn how to migrate your App Service Environment v2 to App Service Previously updated : 4/1/2024 Last updated : 4/9/2024 -# Use the side-by-side migration feature to migrate App Service Environment v2 to App Service Environment v3 (Preview) +# Use the side-by-side migration feature to migrate App Service Environment v2 to App Service Environment v3 > [!NOTE]-> The migration feature described in this article is used for side-by-side (different subnet) automated migration of App Service Environment v2 to App Service Environment v3 and is currently **in preview**. +> The migration feature described in this article is used for side-by-side (different subnet) automated migration of App Service Environment v2 to App Service Environment v3. > > If you're looking for information on the in-place migration feature, see [Migrate to App Service Environment v3 by using the in-place migration feature](migrate.md). If you're looking for information on manual migration options, see [Manual migration options](migration-alternatives.md). For help deciding which migration option is right for you, see [Migration path decision tree](upgrade-to-asev3.md#migration-path-decision-tree). For more information on App Service Environment v3, see [App Service Environment v3 overview](overview.md). > az appservice ase show --name $ASE_NAME --resource-group $ASE_RG > During the migration as well as during the `MigrationPendingDnsChange` step, the Azure portal shows incorrect information about your App Service Environment and your apps. Use the Azure CLI to check the status of your migration. If you have any questions about the status of your migration or your apps, contact support. > +> [!NOTE] +> If your migration includes a custom domain suffix, your custom domain suffix configuration might show as degraded once the migration is complete due to a known bug. Your App Service Environment should still function as expected. The degraded status should resolve itself within 6-8 hours. If the configuration is degraded after 8 hours or if your custom domain suffix isn't functioning, contact support. +> +> + ## 10. Get the inbound IP addresses for your new App Service Environment v3 and update dependent resources -You have two App Service Environments at this stage in the migration process. Your apps are running in both environments. You need to update any dependent resources to use the new IP inbound address for your new App Service Environment v3. For internal facing (ILB) App Service Environments, you need to update your private DNS zones to point to the new inbound IP address. You should account for both the old and new inbound IP at this point. You can remove the dependencies on the previous IP address after you complete the next step. --> [!IMPORTANT] -> During the preview, the new inbound IP might be returned incorrectly due to a known bug. Open a support ticket to receive the correct IP addresses for your App Service Environment v3. -> +You have two App Service Environments at this stage in the migration process. Your apps are running in both environments. You need to update any dependent resources to use the new IP inbound address for your new App Service Environment v3. For internal facing (ILB) App Service Environments, you need to update your private DNS zones to point to the new inbound IP address. This step is where you can validate your new environment and make any remaining necessary updates to your dependent resources. You can get the new inbound IP address for your new App Service Environment v3 by running the following command that corresponds to your App Service Environment load balancer type. It's your responsibility to make any necessary updates. For ELB App Service Environments, get the public inbound IP address by running t az rest --method get --uri "${ASE_ID}?api-version=2022-03-01" --query properties.networkingConfiguration.externalInboundIpAddresses ``` -## 11. Redirect customer traffic and complete migration +## 11. Redirect customer traffic, validate your App Service Environment v3, and complete migration -This step is your opportunity to test and validate your new App Service Environment v3. Your App Service Environment v2 front ends are still running, but the backing compute is an App Service Environment v3. If you're able to access your apps without issues, that means you're ready to complete the migration. +This step is your opportunity to test and validate your new App Service Environment v3. Your App Service Environment v2 front ends are still running, but the backing compute is an App Service Environment v3. If you're able to access your apps without issues that means you're ready to complete the migration. If you want to test your App Service Environment v3 front ends, you can do so by using the inbound IP address you got in the previous step. -Once you confirm your apps are working as expected, you can redirect customer traffic to your new App Service Environment v3 front ends by running the following command. This command also deletes your old environment. +Once you confirm your apps are working as expected, you can redirect customer traffic to your new App Service Environment v3 by running the following command. This command also deletes your old environment. ++If you find any issues or decide at this point that you no longer want to proceed with the migration, contact support to revert the migration. Don't run the DNS change command if you need to revert the migration. For more information, see [Revert migration](./side-by-side-migrate.md#redirect-customer-traffic-validate-your-app-service-environment-v3-and-complete-migration). ```azurecli az rest --method post --uri "${ASE_ID}/NoDowntimeMigrate?phase=DnsChange&api-version=2022-03-01" az rest --method get --uri "${ASE_ID}?api-version=2022-03-01" --query properties During this step, you get a status of `CompletingMigration`. When you get a status of `MigrationCompleted`, the traffic redirection step is done and your migration is complete. -If you find any issues or decide at this point that you no longer want to proceed with the migration, contact support to revert the migration. Don't run the above command if you need to revert the migration. For more information, see [Revert migration](side-by-side-migrate.md#redirect-customer-traffic-and-complete-migration). - ## Next steps > [!div class="nextstepaction"] |
app-service | Migrate | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/environment/migrate.md | Title: Migrate to App Service Environment v3 by using the in-place migration fea description: Overview of the in-place migration feature for migration to App Service Environment v3. Previously updated : 03/27/2024 Last updated : 04/08/2024 Your App Service Environment v3 can be deployed across availability zones in the If your existing App Service Environment uses a custom domain suffix, you're prompted to configure a custom domain suffix for your new App Service Environment v3. You need to provide the custom domain name, managed identity, and certificate. For more information on App Service Environment v3 custom domain suffix including requirements, step-by-step instructions, and best practices, see [Configure custom domain suffix for App Service Environment](./how-to-custom-domain-suffix.md). You must configure a custom domain suffix for your new environment even if you no longer want to use it. Once migration is complete, you can remove the custom domain suffix configuration if needed. -If your migration includes a custom domain suffix, for App Service Environment v3, the custom domain isn't displayed in the **Essentials** section of the **Overview** page of the portal as it is for App Service Environment v1/v2. Instead, for App Service Environment v3, go to the **Custom domain suffix** page where you can confirm your custom domain suffix is configured correctly. +If your migration includes a custom domain suffix, for App Service Environment v3, the custom domain isn't displayed in the **Essentials** section of the **Overview** page of the portal as it is for App Service Environment v1/v2. Instead, for App Service Environment v3, go to the **Custom domain suffix** page where you can confirm your custom domain suffix is configured correctly. Also, on App Service Environment v2, if you have a custom domain suffix, the default host name includes your custom domain suffix and is in the form *APP-NAME.internal.contoso.com*. On App Service Environment v3, the default host name always uses the default domain suffix and is in the form *APP-NAME.ASE-NAME.appserviceenvironment.net*. This difference is because App Service Environment v3 keeps the default domain suffix when you add a custom domain suffix. With App Service Environment v2, there's only a single domain suffix. ### Migrate to App Service Environment v3 |
app-service | Side By Side Migrate | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/environment/side-by-side-migrate.md | Title: Migrate to App Service Environment v3 by using the side-by-side migration description: Overview of the side-by-side migration feature for migration to App Service Environment v3. Previously updated : 3/28/2024 Last updated : 4/8/2024 -# Migration to App Service Environment v3 using the side-by-side migration feature (Preview) +# Migration to App Service Environment v3 using the side-by-side migration feature > [!NOTE]-> The migration feature described in this article is used for side-by-side (different subnet) automated migration of App Service Environment v2 to App Service Environment v3 and is currently **in preview**. +> The migration feature described in this article is used for side-by-side (different subnet) automated migration of App Service Environment v2 to App Service Environment v3. > > If you're looking for information on the in-place migration feature, see [Migrate to App Service Environment v3 by using the in-place migration feature](migrate.md). If you're looking for information on manual migration options, see [Manual migration options](migration-alternatives.md). For help deciding which migration option is right for you, see [Migration path decision tree](upgrade-to-asev3.md#migration-path-decision-tree). For more information on App Service Environment v3, see [App Service Environment v3 overview](overview.md). > The platform creates the [the new outbound IP addresses](networking.md#addresses When completed, the new outbound IPs that your future App Service Environment v3 uses are created. These new IPs have no effect on your existing environment. -You receive the new inbound IP address once migration is complete but before you make the [DNS change to redirect customer traffic to your new App Service Environment v3](#redirect-customer-traffic-and-complete-migration). You don't get the inbound IP at this point in the process because there are dependencies on App Service Environment v3 resources that get created during the migration step. You have a chance to update any resources that are dependent on the new inbound IP before you redirect traffic to your new App Service Environment v3. +You receive the new inbound IP address once migration is complete but before you make the [DNS change to redirect customer traffic to your new App Service Environment v3](#redirect-customer-traffic-validate-your-app-service-environment-v3-and-complete-migration). You don't get the inbound IP at this point in the process because there are dependencies on App Service Environment v3 resources that get created during the migration step. You have a chance to update any resources that are dependent on the new inbound IP before you redirect traffic to your new App Service Environment v3. This step is also where you decide if you want to enable zone redundancy for your new App Service Environment v3. Zone redundancy can be enabled as long as your App Service Environment v3 is [in a region that supports zone redundancy](./overview.md#regions). Azure Policy can be used to deny resource creation and modification to certain p If your existing App Service Environment uses a custom domain suffix, you must configure a custom domain suffix for your new App Service Environment v3. Custom domain suffix on App Service Environment v3 is implemented differently than on App Service Environment v2. You need to provide the custom domain name, managed identity, and certificate, which must be stored in Azure Key Vault. For more information on App Service Environment v3 custom domain suffix including requirements, step-by-step instructions, and best practices, see [Configure custom domain suffix for App Service Environment](./how-to-custom-domain-suffix.md). If your App Service Environment v2 has a custom domain suffix, you must configure a custom domain suffix for your new environment even if you no longer want to use it. Once migration is complete, you can remove the custom domain suffix configuration if needed. +If your migration includes a custom domain suffix, for App Service Environment v3, the custom domain isn't displayed in the **Essentials** section of the **Overview** page of the portal as it is for App Service Environment v1/v2. Instead, for App Service Environment v3, go to the **Custom domain suffix** page where you can confirm your custom domain suffix is configured correctly. Also, on App Service Environment v2, if you have a custom domain suffix, the default host name includes your custom domain suffix and is in the form *APP-NAME.internal.contoso.com*. On App Service Environment v3, the default host name always uses the default domain suffix and is in the form *APP-NAME.ASE-NAME.appserviceenvironment.net*. This difference is because App Service Environment v3 keeps the default domain suffix when you add a custom domain suffix. With App Service Environment v2, there's only a single domain suffix. + ### Migrate to App Service Environment v3 After completing the previous steps, you should continue with migration as soon as possible. Side-by-side migration requires a three to six hour service window for App Servi - The new App Service Environment v3 is created in the subnet you selected. - Your new App Service plans are created in the new App Service Environment v3 with the corresponding Isolated v2 tier. - Your apps are created in the new App Service Environment v3.-- The underlying compute for your apps is moved to the new App Service Environment v3. Your App Service Environment v2 front ends are still serving traffic. The migration process doesn't redirect to the App Service Environment v3 front ends until you complete the final step of the migration.+- The underlying compute for your apps is moved to the new App Service Environment v3. Your App Service Environment v2 front ends are still serving traffic. Your old inbound IP address remains in use. + - For ILB App Service Environments, your App Service Environment v3 front ends aren't used until you update your private DNS zones with the new inbound IP address. + - For ELB App Service Environments, the migration process doesn't redirect to the App Service Environment v3 front ends until you complete the final step of the migration. When this step completes, your application traffic is still going to your old App Service Environment front ends and the inbound IP that was assigned to it. However, you also now have an App Service Environment v3 with all of your apps. ### Get the inbound IP address for your new App Service Environment v3 and update dependent resources -The new inbound IP address is given so that you can set up new endpoints with services like [Traffic Manager](../../traffic-manager/traffic-manager-overview.md) or [Azure Front Door](../../frontdoor/front-door-overview.md) and update any of your private DNS zones. Don't move on to the next step until you account for these changes. There's downtime if you don't update dependent resources with the new inbound IP. **It's your responsibility to update any and all resources that are impacted by the IP address change associated with the new App Service Environment v3. Don't move on to the next step until you've made all required updates.** +The new inbound IP address is given so that you can set up new endpoints with services like [Traffic Manager](../../traffic-manager/traffic-manager-overview.md) or [Azure Front Door](../../frontdoor/front-door-overview.md) and update any of your private DNS zones. Don't move on to the next step until you make these changes. There's downtime if you don't update dependent resources with the new inbound IP. **It's your responsibility to update any and all resources that are impacted by the IP address change associated with the new App Service Environment v3. Don't move on to the next step until you've made all required updates.** -### Redirect customer traffic and complete migration +### Redirect customer traffic, validate your App Service Environment v3, and complete migration -The final step is to redirect traffic to your new App Service Environment v3 and complete the migration. The platform does this change for you, but only when you initiate it. Before you do this step, you should review your new App Service Environment v3 and perform any needed testing to validate that it's functioning as intended. Your App Service Environment v2 front ends are still running, but the backing compute is an App Service Environment v3. If you're able to access your apps without issues, that means you're ready to complete the migration. +The final step is to redirect traffic to your new App Service Environment v3 and complete the migration. The platform does this change for you, but only when you initiate it. Before you do this step, you should review your new App Service Environment v3 and perform any needed testing to validate that it's functioning as intended. Your App Service Environment v2 front ends are still running, but the backing compute is an App Service Environment v3. If you're using an ILB App Service Environment v3, you can test your App Service Environment v3 front ends by updating your private DNS zones with the new inbound IP address. Testing this change allows you to fully validate your App Service Environment v3 before initiating the final step of the migration where your old App Service Environment is deleted. Once you're ready to redirect traffic, you can complete the final step of the migration. This step updates internal DNS records to point to the load balancer IP address of your new App Service Environment v3 and the front ends that were created during the migration. Changes are effective within a couple minutes. If you run into issues, check your cache and TTL settings. This step also shuts down your old App Service Environment and deletes it. Your new App Service Environment v3 is now your production environment. |
app-service | Upgrade To Asev3 | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/environment/upgrade-to-asev3.md | This page is your one-stop shop for guidance and resources to help you upgrade s |-||| |**1**|**Pre-flight check**|Determine if your environment meets the prerequisites to automate your upgrade using one of the automated migration features. Decide whether an in-place or side-by-side migration is right for your use case.<br><br>- [Migration path decision tree](#migration-path-decision-tree)<br>- [Automated upgrade using the in-place migration feature](migrate.md)<br>- [Automated upgrade using the side-by-side migration feature](side-by-side-migrate.md)<br><br>If not, you can upgrade manually.<br><br>- [Manual migration](migration-alternatives.md)| |**2**|**Migrate**|Based on results of your review, either upgrade using one of the automated migration features or follow the manual steps.<br><br>- [Use the in-place automated migration feature](how-to-migrate.md)<br>- [Use the side-by-side automated migration feature](how-to-side-by-side-migrate.md)<br>- [Migrate manually](migration-alternatives.md)|-|**3**|**Testing and troubleshooting**|Upgrading using one of the automated migration features requires a 3-6 hour service window. If you use the side-by-side migration feature, you have the opportunity to [test and validate your App Service Environment v3](side-by-side-migrate.md#redirect-customer-traffic-and-complete-migration) before completing the upgrade. Support teams are monitoring upgrades to ensure success. If you have a support plan and you need technical help, create a [support request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest).| +|**3**|**Testing and troubleshooting**|Upgrading using one of the automated migration features requires a 3-6 hour service window. If you use the side-by-side migration feature, you have the opportunity to [test and validate your App Service Environment v3](./side-by-side-migrate.md#redirect-customer-traffic-validate-your-app-service-environment-v3-and-complete-migration) before completing the upgrade. Support teams are monitoring upgrades to ensure success. If you have a support plan and you need technical help, create a [support request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest).| |**4**|**Optimize your App Service plans**|Once your upgrade is complete, you can optimize the App Service plans for additional benefits.<br><br>Review the autoselected Isolated v2 SKU sizes and scale up or scale down your App Service plans as needed.<br><br>- [Scale down your App Service plans](../manage-scale-up.md)<br>- [App Service Environment post-migration scaling guidance](migrate.md#pricing)<br><br>Explore reserved instance pricing, savings plans, and check out the pricing estimates if needed.<br><br>- [App Service pricing page](https://azure.microsoft.com/pricing/details/app-service/windows/)<br>- [How reservation discounts apply to Isolated v2 instances](../../cost-management-billing/reservations/reservation-discount-app-service.md#how-reservation-discounts-apply-to-isolated-v2-instances)<br>- [Azure pricing calculator](https://azure.microsoft.com/pricing/calculator)| |**5**|**Learn more**|On-demand: [Learn Live webinar with Azure FastTrack Architects](https://www.youtube.com/watch?v=lI9TK_v-dkg&ab_channel=MicrosoftDeveloper).<br><br>Need more help? [Submit a request](https://cxp.azure.com/nominationportal/nominationform/fasttrack) to contact FastTrack.<br><br>[Frequently asked questions](migrate.md#frequently-asked-questions)<br><br>[Community support](https://aka.ms/asev1v2retirement)| |
app-service | Language Support Policy | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/language-support-policy.md | App Service follows community support timelines for the lifecycle of the runtime End-of-support dates for runtime versions are determined independently by their respective stacks and are outside the control of App Service. App Service sends reminder notifications to subscription owners for upcoming end-of-support runtime versions when they become available for each language. -Those who receive notifications include account administrators, service administrators, and coadministrators. Contributors, readers, or other roles won't directly receive notifications, unless they opt in to receive notification emails, using [Service Health Alerts](../service-health/alerts-activity-log-service-notifications-portal.md). +Those who receive notifications include account administrators, service administrators, and coadministrators. Contributors, readers, or other roles don't directly receive notifications unless they opt in to receive notification emails, using [Service Health Alerts](../service-health/alerts-activity-log-service-notifications-portal.md). ## Timelines for language runtime version support Microsoft and Adoptium builds of OpenJDK are provided and supported on App Servi | JBoss 8 Java 17\*\* | Ubuntu | MSFT OpenJDK 17 | | JBoss 8 Java 21\*\* | Ubuntu | MSFT OpenJDK 21 | -\*\* Upcoming versions +\*\* Upcoming versions --> -\* Alpine 3.16 is the last supported Alpine distribution in App Service. It's recommended to pin to a version to avoid switching over to Ubuntu automatically. Make sure you test and switch to Java offering supported by Ubuntu based distributions when possible. --> +\* Alpine 3.16 is the last supported Alpine distribution in App Service. It's recommended to pin to a version to avoid switching over to Ubuntu automatically. Make sure you test and switch to Java offering supported by Ubuntu based distributions when possible. # [Windows](#tab/windows) Microsoft and Adoptium builds of OpenJDK are provided and supported on App Servi If you're [pinned](configure-language-java.md#choosing-a-java-runtime-version) to an older minor version of Java, your site may be using the deprecated [Azul Zulu for Azure](https://devblogs.microsoft.com/java/end-of-updates-support-and-availability-of-zulu-for-azure/) binaries provided through [Azul Systems](https://www.azul.com/). You can continue to use these binaries for your site, but any security patches or improvements will only be available in new versions of the OpenJDK, so we recommend that you periodically update your Web Apps to a later version of Java. -Major version updates will be provided through new runtime options in Azure App Service. Customers update to these newer versions of Java by configuring their App Service deployment and are responsible for testing and ensuring the major update meets their needs. +Major version updates are provided through new runtime options in Azure App Service. Customers update to these newer versions of Java by configuring their App Service deployment and are responsible for testing and ensuring the major update meets their needs. Supported JDKs are automatically patched on a quarterly basis in January, April, July, and October of each year. For more information on Java on Azure, see [this support document](/azure/developer/java/fundamentals/java-support-on-azure). ### Security updates -Patches and fixes for major security vulnerabilities will be released as soon as they become available in Microsoft builds of the OpenJDK. A "major" vulnerability is defined by a base score of 9.0 or higher on the [NIST Common Vulnerability Scoring System, version 2](https://nvd.nist.gov/vuln-metrics/cvss). +Patches and fixes for major security vulnerabilities are released as soon as they become available in Microsoft builds of the OpenJDK. A "major" vulnerability is defined by a base score of 9.0 or higher on the [NIST Common Vulnerability Scoring System, version 2](https://nvd.nist.gov/vuln-metrics/cvss). -Tomcat 8.0 has reached [End of Life as of September 30, 2018](https://tomcat.apache.org/tomcat-80-eol.html). While the runtime is still available on Azure App Service, Azure won't apply security updates to Tomcat 8.0. If possible, migrate your applications to Tomcat 8.5 or 9.0. Both Tomcat 8.5 and 9.0 are available on Azure App Service. For more information, see the [official Tomcat site](https://tomcat.apache.org/whichversion.html). +Tomcat 8.5 reached [End of Life as of March 31, 2024](https://tomcat.apache.org/tomcat-85-eol.html) and Tomcat 10.0 reached [End of Life as of October 31, 2022](https://tomcat.apache.org/tomcat-10.0-eol.html). ++While the runtimes are still available on Azure App Service, Azure won't apply security updates to Tomcat 8.5 or 10.0. ++When possible, migrate your applications to Tomcat 9.5 or Tomcat 10.1. Tomcat 9.5 and Tomcat 10.1 are available on Azure App Service. For more information, see the [official Tomcat site](https://tomcat.apache.org/whichversion.html). Community support for Java 7 ended on July 29, 2022 and [Java 7 was retired from App Service](https://azure.microsoft.com/updates/transition-to-java-11-or-8-by-29-july-2022/). If you have a web app running on Java 7, upgrade to Java 8 or 11 immediately. |
app-service | Provision Resource Bicep | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/app-service/provision-resource-bicep.md | To deploy a different language stack, update `linuxFxVersion` with appropriate v | **PHP** | linuxFxVersion="PHP|7.4" | | **Node.js** | linuxFxVersion="NODE|10.15" | | **Java** | linuxFxVersion="JAVA|1.8 |TOMCAT|9.0" |-| **Python** | linuxFxVersion="PYTHON|3.7" | +| **Python** | linuxFxVersion="PYTHON|3.8" | |
application-gateway | Ipv6 Application Gateway Portal | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/application-gateway/ipv6-application-gateway-portal.md | description: Learn how to configure Application Gateway with a frontend public I Previously updated : 03/17/2024 Last updated : 04/04/2024 -> [!IMPORTANT] -> Application Gateway IPv6 support is now generally available. Updates to the Azure portal for IPv6 support are currently being deployed across all regions and will be fully available within the next few weeks. In the meantime to use the portal to create an IPv6 Application Gateway continue using the [preview registration process](/azure/azure-resource-manager/management/preview-features?tabs=azure-portal) in the Azure portal to opt in for **Allow Application Gateway IPv6 Access**. [Azure Application Gateway](overview.md) supports dual stack (IPv4 and IPv6) frontend connections from clients. To use IPv6 frontend connectivity, you need to create a new Application Gateway. Currently you canΓÇÖt upgrade existing IPv4 only Application Gateways to dual stack (IPv4 and IPv6) Application Gateways. Also, currently backend IPv6 addresses aren't supported. You can also complete this quickstart using [Azure PowerShell](ipv6-application- ## Regions and availability -The IPv6 Application Gateway preview is available to all public cloud regions where Application Gateway v2 SKU is supported. It's also available in [Microsoft Azure operated by 21Vianet](https://www.azure.cn/) and [Azure Government](https://azure.microsoft.com/overview/clouds/government/) +The IPv6 Application Gateway is available to all public cloud regions where Application Gateway v2 SKU is supported. It's also available in [Microsoft Azure operated by 21Vianet](https://www.azure.cn/) and [Azure Government](https://azure.microsoft.com/overview/clouds/government/) ## Limitations An Azure account with an active subscription is required. If you don't already Sign in to the [Azure portal](https://portal.azure.com) with your Azure account. -Use the [preview registration process](/azure/azure-resource-manager/management/preview-features?tabs=azure-portal) in the Azure portal to **Allow Application Gateway IPv6 Access**. This is required until the feature is completely rolled out in the Azure portal. + ## Create an application gateway Create the application gateway using the tabs on the **Create application gatewa 1. On the **Frontends** tab, verify **Frontend IP address type** is set to **Public**. > [!IMPORTANT]- > For the Application Gateway v2 SKU, there must be a **Public** frontend IP configuration. A private IPv6 frontend IP configuration (Only ILB mode) is currently not supported for the IPv6 Application Gateway preview. + > For the Application Gateway v2 SKU, there must be a **Public** frontend IP configuration. A private IPv6 frontend IP configuration (Only ILB mode) is currently not supported for the IPv6 Application Gateway. 2. Select **Add new** for the **Public IP address**, enter a name for the public IP address, and select **OK**. For example, **myAGPublicIPAddress**. ![A screenshot of create new application gateway: frontends.](./media/ipv6-application-gateway-portal/ipv6-frontends.png) > [!NOTE]- > IPv6 Application Gateway (preview) supports up to 4 frontend IP addresses: two IPv4 addresses (Public and Private) and two IPv6 addresses (Public and Private) + > IPv6 Application Gateway supports up to 4 frontend IP addresses: two IPv4 addresses (Public and Private) and two IPv6 addresses (Public and Private) 3. Select **Next: Backends**. |
azure-app-configuration | Concept Enable Rbac | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-app-configuration/concept-enable-rbac.md | Title: Authorize access to Azure App Configuration using Microsoft Entra ID -description: Enable Azure RBAC to authorize access to your Azure App Configuration instance +description: Enable Azure RBAC to authorize access to your Azure App Configuration instance. Last updated 05/26/2020-Besides using Hash-based Message Authentication Code (HMAC), Azure App Configuration supports using Microsoft Entra ID to authorize requests to App Configuration instances. Microsoft Entra ID allows you to use Azure role-based access control (Azure RBAC) to grant permissions to a security principal. A security principal may be a user, a [managed identity](../active-directory/managed-identities-azure-resources/overview.md) or an [application service principal](../active-directory/develop/app-objects-and-service-principals.md). To learn more about roles and role assignments, see [Understanding different roles](../role-based-access-control/overview.md). +Besides using Hash-based Message Authentication Code (HMAC), Azure App Configuration supports using Microsoft Entra ID to authorize requests to App Configuration instances. Microsoft Entra ID allows you to use Azure role-based access control (Azure RBAC) to grant permissions to a security principal. A security principal may be a user, a [managed identity](../active-directory/managed-identities-azure-resources/overview.md), or an [application service principal](../active-directory/develop/app-objects-and-service-principals.md). To learn more about roles and role assignments, see [Understanding different roles](../role-based-access-control/overview.md). ## Overview Requests made by a security principal to access an App Configuration resource must be authorized. With Microsoft Entra ID, access to a resource is a two-step process:-1. The security principal's identity is authenticated and an OAuth 2.0 token is returned. The resource name to request a token is `https://login.microsoftonline.com/{tenantID}` where `{tenantID}` matches the Microsoft Entra tenant ID to which the service principal belongs. +1. The security principal's identity is authenticated and an OAuth 2.0 token is returned. The resource name to request a token is `https://login.microsoftonline.com/{tenantID}` where `{tenantID}` matches the Microsoft Entra tenant ID to which the service principal belongs. 2. The token is passed as part of a request to the App Configuration service to authorize access to the specified resource. -The authentication step requires that an application request contains an OAuth 2.0 access token at runtime. If an application is running within an Azure entity, such as an Azure Functions app, an Azure Web App, or an Azure VM, it can use a managed identity to access the resources. To learn how to authenticate requests made by a managed identity to Azure App Configuration, see [Authenticate access to Azure App Configuration resources with Microsoft Entra ID and managed identities for Azure Resources](howto-integrate-azure-managed-service-identity.md). +The authentication step requires that an application request contains an OAuth 2.0 access token at runtime. If an application is running within an Azure entity, such as an Azure Functions app, an Azure Web App, or an Azure VM, it can use a managed identity to access the resources. To learn how to authenticate requests made by a managed identity to Azure App Configuration, see [Authenticate access to Azure App Configuration resources with Microsoft Entra ID and managed identities for Azure Resources](howto-integrate-azure-managed-service-identity.md). The authorization step requires that one or more Azure roles be assigned to the security principal. Azure App Configuration provides Azure roles that encompass sets of permissions for App Configuration resources. The roles that are assigned to a security principal determine the permissions provided to the principal. For more information about Azure roles, see [Azure built-in roles for Azure App Configuration](#azure-built-in-roles-for-azure-app-configuration). When an Azure role is assigned to a Microsoft Entra security principal, Azure gr ## Azure built-in roles for Azure App Configuration Azure provides the following Azure built-in roles for authorizing access to App Configuration data using Microsoft Entra ID: -- **App Configuration Data Owner**: Use this role to give read/write/delete access to App Configuration data. This does not grant access to the App Configuration resource.-- **App Configuration Data Reader**: Use this role to give read access to App Configuration data. This does not grant access to the App Configuration resource.-- **Contributor** or **Owner**: Use this role to manage the App Configuration resource. It grants access to the resource's access keys. While the App Configuration data can be accessed using access keys, this role does not grant direct access to the data using Microsoft Entra ID. This role is required if you access the App Configuration data via ARM template, Bicep, or Terraform during deployment. For more information, see [authorization](quickstart-resource-manager.md#authorization).-- **Reader**: Use this role to give read access to the App Configuration resource. This does not grant access to the resource's access keys, nor to the data stored in App Configuration.+- **App Configuration Data Owner**: Use this role to give read/write/delete access to App Configuration data. This role doesn't grant access to the App Configuration resource. +- **App Configuration Data Reader**: Use this role to give read access to App Configuration data. This role doesn't grant access to the App Configuration resource. +- **Contributor** or **Owner**: Use this role to manage the App Configuration resource. It grants access to the resource's access keys. While the App Configuration data can be accessed using access keys, this role doesn't grant direct access to the data using Microsoft Entra ID. This role is required if you access the App Configuration data via ARM template, Bicep, or Terraform during deployment. For more information, see [deployment](quickstart-deployment-overview.md). +- **Reader**: Use this role to give read access to the App Configuration resource. This role doesn't grant access to the resource's access keys, nor to the data stored in App Configuration. > [!NOTE] > After a role assignment is made for an identity, allow up to 15 minutes for the permission to propagate before accessing data stored in App Configuration using this identity. |
azure-app-configuration | Howto Disable Access Key Authentication | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-app-configuration/howto-disable-access-key-authentication.md | Title: Disable access key authentication for an Azure App Configuration instance -description: Learn how to disable access key authentication for an Azure App Configuration instance +description: Learn how to disable access key authentication for an Azure App Configuration instance. When you disable access key authentication for an Azure App Configuration resour ## Disable access key authentication -Disabling access key authentication will delete all access keys. If any running applications are using access keys for authentication they will begin to fail once access key authentication is disabled. Enabling access key authentication again will generate a new set of access keys and any applications attempting to use the old access keys will still fail. +Disabling access key authentication will delete all access keys. If any running applications are using access keys for authentication, they will begin to fail once access key authentication is disabled. Enabling access key authentication again will generate a new set of access keys and any applications attempting to use the old access keys will still fail. > [!WARNING] > If any clients are currently accessing data in your Azure App Configuration resource with access keys, then Microsoft recommends that you migrate those clients to [Microsoft Entra ID](./concept-enable-rbac.md) before disabling access key authentication.-> Additionally, it is recommended to read the [limitations](#limitations) section below to verify the limitations won't affect the intended usage of the resource. # [Azure portal](#tab/portal) To disallow access key authentication for an Azure App Configuration resource in the Azure portal, follow these steps: 1. Navigate to your Azure App Configuration resource in the Azure portal.-2. Locate the **Access keys** setting under **Settings**. +2. Locate the **Access settings** setting under **Settings**. - :::image type="content" border="true" source="./media/access-keys-blade.png" alt-text="Screenshot showing how to access an Azure App Configuration resources access key blade"::: + :::image type="content" border="true" source="./media/access-settings-blade.png" alt-text="Screenshot showing how to access an Azure App Configuration resources access key blade."::: 3. Set the **Enable access keys** toggle to **Disabled**. The capability to disable access key authentication using the Azure CLI is in de ### Verify that access key authentication is disabled -To verify that access key authentication is no longer permitted, a request can be made to list the access keys for the Azure App Configuration resource. If access key authentication is disabled there will be no access keys and the list operation will return an empty list. +To verify that access key authentication is no longer permitted, a request can be made to list the access keys for the Azure App Configuration resource. If access key authentication is disabled, there will be no access keys, and the list operation will return an empty list. # [Azure portal](#tab/portal) To verify access key authentication is disabled for an Azure App Configuration resource in the Azure portal, follow these steps: 1. Navigate to your Azure App Configuration resource in the Azure portal.-2. Locate the **Access keys** setting under **Settings**. +2. Locate the **Access settings** setting under **Settings**. - :::image type="content" border="true" source="./media/access-keys-blade.png" alt-text="Screenshot showing how to access an Azure App Configuration resources access key blade"::: + :::image type="content" border="true" source="./media/access-settings-blade.png" alt-text="Screenshot showing how to access an Azure App Configuration resources access key blade."::: 3. Verify there are no access keys displayed and **Enable access keys** is toggled to **Disabled**. az appconfig credential list \ --resource-group <resource-group> ``` -If access key authentication is disabled then an empty list will be returned. +If access key authentication is disabled, then an empty list will be returned. ``` C:\Users\User>az appconfig credential list -g <resource-group> -n <app-configuration-name> These roles do not provide access to data in an Azure App Configuration resource Role assignments must be scoped to the level of the Azure App Configuration resource or higher to permit a user to allow or disallow access key authentication for the resource. For more information about role scope, see [Understand scope for Azure RBAC](../role-based-access-control/scope-overview.md). -Be careful to restrict assignment of these roles only to those who require the ability to create an App Configuration resource or update its properties. Use the principle of least privilege to ensure that users have the fewest permissions that they need to accomplish their tasks. For more information about managing access with Azure RBAC, see [Best practices for Azure RBAC](../role-based-access-control/best-practices.md). +Be careful to restrict assignment of these roles only to those users who require the ability to create an App Configuration resource or update its properties. Use the principle of least privilege to ensure that users have the fewest permissions that they need to accomplish their tasks. For more information about managing access with Azure RBAC, see [Best practices for Azure RBAC](../role-based-access-control/best-practices.md). > [!NOTE] > The classic subscription administrator roles Service Administrator and Co-Administrator include the equivalent of the Azure Resource Manager [Owner](../role-based-access-control/built-in-roles.md#owner) role. The **Owner** role includes all actions, so a user with one of these administrative roles can also create and manage App Configuration resources. For more information, see [Azure roles, Microsoft Entra roles, and classic subscription administrator roles](../role-based-access-control/rbac-and-directory-admin-roles.md#classic-subscription-administrator-roles). -## Limitations --The capability to disable access key authentication has the following limitation: --### ARM template access --When access key authentication is disabled, the capability to read/write key-values in an [ARM template](./quickstart-resource-manager.md) will be disabled as well. This is because access to the Microsoft.AppConfiguration/configurationStores/keyValues resource used in ARM templates requires an Azure Resource Manager role, such as contributor or owner. When access key authentication is disabled, access to the resource requires one of the Azure App Configuration [data plane roles](concept-enable-rbac.md), therefore ARM template access is rejected. +> [!NOTE] +> When access key authentication is disabled and [ARM authentication mode](./quickstart-deployment-overview.md#azure-resource-manager-authentication-mode) of App Configuration store is local, the capability to read/write key-values in an [ARM template](./quickstart-resource-manager.md) will be disabled as well. This is because access to the Microsoft.AppConfiguration/configurationStores/keyValues resource used in ARM templates requires access key authentication with local ARM authentication mode. It's recommended to use pass-through ARM authentication mode. For more information, see [Deployment overview](./quickstart-deployment-overview.md). ## Next steps |
azure-app-configuration | Quickstart Bicep | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-app-configuration/quickstart-bicep.md | This quickstart describes how you can use Bicep to: If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin. +## Authorization ++Managing an Azure App Configuration resource with Bicep file requires an Azure Resource Manager role, such as contributor or owner. Accessing Azure App Configuration data (key-values, snapshots) requires an Azure Resource Manager role and an additional Azure App Configuration [data plane role](concept-enable-rbac.md) when the configuration store's ARM authentication mode is set to [pass-through](./quickstart-deployment-overview.md#azure-resource-manager-authentication-mode) ARM authentication mode. + ## Review the Bicep file The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/app-configuration-store-kv/). |
azure-app-configuration | Quickstart Deployment Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-app-configuration/quickstart-deployment-overview.md | + + Title: Deployment overview ++description: Learn how to use Azure App Configuration in deployment. ++ Last updated : 03/15/2024++++++# Deployment ++Azure App Configuration supports the following methods to read and manage your configuration during deployment: ++- [ARM template](./quickstart-resource-manager.md) +- [Bicep](./quickstart-bicep.md) +- Terraform ++## Manage Azure App Configuration resources in deployment ++### Azure Resource Manager Authorization ++You must have Azure Resource Manager permissions to manage Azure App Configuration resources. Azure role-based access control (Azure RBAC) roles that provide these permissions include the Microsoft.AppConfiguration/configurationStores/write or Microsoft.AppConfiguration/configurationStores/* action. Built-in roles with this action include: ++- Owner +- Contributor ++To learn more about Azure RBAC and Microsoft Entra ID, see [Authorize access to Azure App Configuration using Microsoft Entra ID](./concept-enable-rbac.md). ++## Manage Azure App Configuration data in deployment ++Azure App Configuration data, such as key-values and snapshots, can be managed in deployment. When managing App Configuration data using this method, it's recommended to set your configuration store's Azure Resource Manager authentication mode to **Pass-through**. This authentication mode ensures that data access requires a combination of data plane and Azure Resource Manager management roles and ensuring that data access can be properly attributed to the deployment caller for auditing purpose. ++### Azure Resource Manager authentication mode ++# [Azure portal](#tab/portal) ++To configure the Azure Resource Manager authentication mode of an Azure App Configuration resource in the Azure portal, follow these steps: ++1. Navigate to your Azure App Configuration resource in the Azure portal +2. Locate the **Access settings** setting under **Settings** ++ :::image type="content" border="true" source="./media/access-settings-blade.png" alt-text="Screenshot showing how to access an Azure App Configuration resources access settings blade."::: ++3. Select the recommended **Pass-through** authentication mode under **Azure Resource Manager Authentication Mode** ++ :::image type="content" border="true" source="./media/quickstarts/deployment/select-passthrough-authentication-mode.png" alt-text="Screenshot showing pass-through authentication mode being selected under Azure Resource Manager Authentication Mode."::: ++++> [!NOTE] +> Local authentication mode is for backward compatibility and has several limitations. It does not support proper auditing for accessing data in deployment. Under local authentication mode, key-value data access inside an ARM template/Bicep/Terraform is disabled if [access key authentication is disabled](./howto-disable-access-key-authentication.md). Azure App Configuration data plane permissions are not required for accessing data under local authentication mode. ++### Azure App Configuration Authorization ++When your App Configuration resource has its Azure Resource Manager authentication mode set to **Pass-through**, you must have Azure App Configuration data plane permissions to read and manage Azure App Configuration data in deployment. This requirement is in addition to baseline management permission requirements of the resource. Azure App Configuration data plane permissions include Microsoft.AppConfiguration/configurationStores/\*/read and Microsoft.AppConfiguration/configurationStores/\*/write. Built-in roles with this action include: ++- App Configuration Data Owner +- App Configuration Data Reader ++To learn more about Azure RBAC and Microsoft Entra ID, see [Authorize access to Azure App Configuration using Microsoft Entra ID](./concept-enable-rbac.md). ++### Private network access ++When an App Configuration resource is restricted to private network access, deployments accessing App Configuration data through public networks will be blocked. To enable successful deployments when access to an App Configuration resource is restricted to private networks the following actions must be taken: ++- [Azure Resource Management Private Link](../azure-resource-manager/management/create-private-link-access-portal.md) must be set up +- The App Configuration resource must have Azure Resource Manager authentication mode set to **Pass-through** +- The App Configuration resource must have Azure Resource Manager private network access enabled +- Deployments accessing App Configuration data must run through the configured Azure Resource Manager private link ++If all of these criteria are met, then deployments accessing App Configuration data will be successful. ++# [Azure portal](#tab/portal) ++To enable Azure Resource Manager private network access for an Azure App Configuration resource in the Azure portal, follow these steps: ++1. Navigate to your Azure App Configuration resource in the Azure portal +2. Locate the **Networking** setting under **Settings** ++ :::image type="content" border="true" source="./media/networking-blade.png" alt-text="Screenshot showing how to access an Azure App Configuration resources networking blade."::: ++3. Check **Enable Azure Resource Manager Private Access** under **Private Access** ++ :::image type="content" border="true" source="./media/quickstarts/deployment/enable-azure-resource-manager-private-access.png" alt-text="Screenshot showing Enable Azure Resource Manager Private Access is checked."::: ++> [!NOTE] +> Azure Resource Manager private network access can only be enabled under **Pass-through** authentication mode. ++++## Next steps ++To learn about deployment using ARM template and Bicep, check the documentations linked below. ++- [Quickstart: Create an Azure App Configuration store by using an ARM template](./quickstart-resource-manager.md) +- [Quickstart: Create an Azure App Configuration store using Bicep](./quickstart-bicep.md) |
azure-app-configuration | Quickstart Resource Manager | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-app-configuration/quickstart-resource-manager.md | -This quickstart describes how to : +This quickstart describes how to: - Deploy an App Configuration store using an Azure Resource Manager template (ARM template). - Create key-values in an App Configuration store using ARM template. If you don't have an Azure subscription, create a [free account](https://azure.m ## Authorization -Accessing key-value data inside an ARM template requires an Azure Resource Manager role, such as contributor or owner. Access via one of the Azure App Configuration [data plane roles](concept-enable-rbac.md) currently is not supported. --> [!NOTE] -> Key-value data access inside an ARM template is disabled if access key authentication is disabled. For more information, see [disable access key authentication](./howto-disable-access-key-authentication.md#limitations). +Managing Azure App Configuration resource inside an ARM template requires Azure Resource Manager role, such as contributor or owner. Accessing Azure App Configuration data (key-values, snapshots) requires Azure Resource Manager role and Azure App Configuration [data plane role](concept-enable-rbac.md) under [pass-through](./quickstart-deployment-overview.md#azure-resource-manager-authentication-mode) ARM authentication mode. ## Review the template |
azure-arc | Choose Service | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/choose-service.md | + + Title: Choosing the right Azure Arc service for machines +description: Learn about the different services offered by Azure Arc and how to choose the right one for your machines. Last updated : 04/08/2024++++# Choosing the right Azure Arc service for machines ++Azure Arc offers different services based on your existing IT infrastructure and management needs. Before onboarding your resources to Azure Arc-enabled servers, you should investigate the different Azure Arc offerings to determine which best suits your requirements. Choosing the right Azure Arc service provides the best possible inventorying and management of your resources. ++There are several different ways you can connect your existing Windows and Linux machines to Azure Arc: ++- Azure Arc-enabled servers +- Azure Arc-enabled VMware vSphere +- Azure Arc-enabled System Center Virtual Machine Manager (SCVMM) +- Azure Arc-enabled Azure Stack HCI ++Each of these services extends the Azure control plane to your existing infrastructure and enables the use of [Azure security, governance, and management capabilities using the Connected Machine agent](/azure/azure-arc/servers/overview). Other services besides Azure Arc-enabled servers also use an [Azure Arc resource bridge](/azure/azure-arc/resource-bridge/overview), a part of the core Azure Arc platform that provides self-servicing and additional management capabilities. ++General recommendations about the right service to use are as follows: ++|If your machine is a... |...connect to Azure with... | +||| +|VMware VM (not running on AVS) |[Azure Arc-enabled VMware vSphere](vmware-vsphere/overview.md) | +|Azure VMware Solution (AVS) VM |[Azure Arc-enabled VMware vSphere for Azure VMware Solution](/azure/azure-vmware/deploy-arc-for-azure-vmware-solution?tabs=windows) | +|VM managed by System Center Virtual Machine Manager |[Azure Arc-enabled SCVMM](vmware-vsphere/overview.md) | +|Azure Stack HCI VM |[Arc-enabled Azure Stack HCI](/azure-stack/hci/overview) | +|Physical server |[Azure Arc-enabled servers](servers/overview.md) | +|VM on another hypervisor |[Azure Arc-enabled servers](servers/overview.md) | +|VM on another cloud provider |[Azure Arc-enabled servers](servers/overview.md) | ++If you're unsure about which of these services to use, you can start with Azure Arc-enabled servers and add a resource bridge for additional management capabilities later. Azure Arc-enabled servers allows you to connect servers containing all of the types of VMs supported by the other services and provides a wide range of capabilities such as Azure Policy and monitoring, while adding resource bridge can extend additional capabilities. ++Region availability also varies between Azure Arc services, so you may need to use Azure Arc-enabled servers if a more specialized version of Azure Arc is unavailable in your preferred region. See [Azure Products by Region](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=azure-arc®ions=all&rar=true) to learn more about region availability for Azure Arc services. ++Where your machine runs determines the best Azure Arc service to use. Organizations with diverse infrastructure may end up using more than one Azure Arc service; this is alright. The core set of features remains the same no matter which Azure Arc service you use. ++## Azure Arc-enabled servers ++[Azure Arc-enabled servers](servers/overview.md) lets you manage Windows and Linux physical servers and virtual machines hosted outside of Azure, on your corporate network, or other cloud provider. When connecting your machine to Azure Arc-enabled servers, you can perform various operational functions similar to native Azure virtual machines. ++### Capabilities ++- Govern: Assign Azure Automanage machine configurations to audit settings within the machine. Utilize Azure Policy pricing guide for cost understanding. ++- Protect: Safeguard non-Azure servers with Microsoft Defender for Endpoint, integrated through Microsoft Defender for Cloud. This includes threat detection, vulnerability management, and proactive security monitoring. Utilize Microsoft Sentinel for collecting security events and correlating them with other data sources. ++- Configure: Employ Azure Automation for managing tasks using PowerShell and Python runbooks. Use Change Tracking and Inventory for assessing configuration changes. Utilize Update Management for handling OS updates. Perform post-deployment configuration and automation tasks using supported Azure Arc-enabled servers VM extensions. ++- Monitor: Utilize VM insights for monitoring OS performance and discovering application components. Collect log data, such as performance data and events, through the Log Analytics agent, storing it in a Log Analytics workspace. ++- Procure Extended Security Updates (ESUs) at scale for your Windows Server 2012 and 2012R2 machines running on vCenter managed estate. ++> [!IMPORTANT] +> Azure Arc-enabled VMware vSphere and Azure Arc-enabled SCVMM have all the capabilities of Azure Arc-enabled servers, but also provide specific, additional capabilities. +> +## Azure Arc-enabled VMware vSphere ++[Azure Arc-enabled VMware vSphere](vmware-vsphere/overview.md) simplifies the management of hybrid IT resources distributed across VMware vSphere and Azure. ++Running software in Azure VMware Solution, as a private cloud in Azure, offers some benefits not realized by operating your environment outside of Azure. For software running in a VM, such as SQL Server and Windows Server, running in Azure VMware Solution provides additional value such as free Extended Security Updates (ESUs). ++To take advantage of these benefits if you're running in an Azure VMware Solution, it's important to follow respective [onboarding](/azure/azure-vmware/deploy-arc-for-azure-vmware-solution?tabs=windows) processes to fully integrate the experience with the AVS private cloud. ++Additionally, when a VM in Azure VMware Solution private cloud is Azure Arc-enabled using a method distinct from the one outlined in the AVS public document, the steps are provided in the [document](/azure/azure-vmware/deploy-arc-for-azure-vmware-solution?tabs=windows) to refresh the integration between the Azure Arc-enabled VMs and Azure VMware Solution. ++### Capabilities ++- Discover your VMware vSphere estate (VMs, templates, networks, datastores, clusters/hosts/resource pools) and register resources with Azure Arc at scale. ++- Perform various virtual machine (VM) operations directly from Azure, such as create, resize, delete, and power cycle operations such as start/stop/restart on VMware VMs consistently with Azure. ++- Empower developers and application teams to self-serve VM operations on-demand usingΓÇ»Azure role-based access controlΓÇ»(RBAC). ++- Install the Azure Arc-connected machine agent at scale on VMware VMs toΓÇ»govern, protect, configure, and monitorΓÇ»them. ++- Browse your VMware vSphere resources (VMs, templates, networks, and storage) in Azure, providing you with a single pane view for your infrastructure across both environments. ++## Azure Arc-enabled System Center Virtual Machine Manager (SCVMM) ++[Azure Arc-enabled System Center Virtual Machine Manager](system-center-virtual-machine-manager/overview.md) (SCVMM) empowers System Center customers to connect their VMM environment to Azure and perform VM self-service operations from Azure portal. ++Azure Arc-enabled System Center Virtual Machine Manager also allows you to manage your hybrid environment consistently and perform self-service VM operations through Azure portal. For Microsoft Azure Pack customers, this solution is intended as an alternative to perform VM self-service operations. ++### Capabilities ++- Discover and onboard existing SCVMM managed VMs to Azure. ++- Perform various VM lifecycle operations such as start, stop, pause, and delete VMs on SCVMM managed VMs directly from Azure. ++- Empower developers and application teams to self-serve VM operations on demand usingΓÇ»Azure role-based access control (RBAC). ++- Browse your VMM resources (VMs, templates, VM networks, and storage) in Azure, providing you with a single pane view for your infrastructure across both environments. ++- Install the Azure Arc-connected machine agents at scale on SCVMM VMs toΓÇ»govern, protect, configure, and monitor them. ++## Azure Stack HCI ++[Azure Stack HCI](/azure-stack/hci/overview) is a hyperconverged infrastructure operating system delivered as an Azure service. This is a hybrid solution that is designed to host virtualized Windows and Linux VM or containerized workloads and their storage. Azure Stack HCI is a hybrid product that is offered on validated hardware and connects on-premises estates to Azure, enabling cloud-based services, monitoring and management. This helps customers manage their infrastructure from Azure and run virtualized workloads on-premises, making it easy for them to consolidate aging infrastructure and connect to Azure. ++> [!NOTE] +> Azure Stack HCI comes with Azure resource bridge installed and uses the Azure Arc control plane for infrastructure and workload management, allowing you to monitor, update, and secure your HCI infrastructure from the Azure portal. +> ++### Capabilities ++- Deploy and manage workloads, including VMs and Kubernetes clusters from Azure through the Azure Arc resource bridge. ++- Manage VM lifecycle operations such as start, stop, delete from Azure control plane. ++- Manage Kubernetes lifecycle operations such as scale, update, upgrade, and delete clusters from Azure control plane. ++- Install Azure connected machine agent and Azure Arc-enabled Kubernetes agent on your VM and Kubernetes clusters to use Azure services (i.e., Azure Monitor, Azure Defender for cloud, etc.). ++- Leverage Azure Virtual Desktop for Azure Stack HCI to deploy session hosts on to your on-premises infrastructure to better meet your performance or data locality requirements. ++- Empower developers and application teams to self-serve VM and Kubernetes cluster operations on demand usingΓÇ»Azure role-based access control (RBAC). ++- Monitor, update, and secure your Azure Stack HCI infrastructure and workloads across fleets of locations directly from the Azure portal. ++- Deploy and manage static and DHCP-based logical networks on-premises to host your workloads. ++- VM image management with Azure Marketplace integration and ability to bring your own images from Azure storage account and cluster shared volumes. ++- Create and manage storage paths to store your VM disks and config files. ++## Capabilities at a glance ++The following table provides a quick way to see the major capabilities of the three Azure Arc services that connect your existing Windows and Linux machines to Azure Arc. ++| |Arc-enabled servers |Arc-enabled VMware vSphere |Arc-enabled SCVMM |Arc-enabled Azure Stack HCI |SQL Server enabled by Azure Arc | +|||||| +|Microsoft Defender for Cloud |Γ£ô |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Microsoft Sentinel | Γ£ô |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Azure Automation |Γ£ô |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Azure Update Manager |Γ£ô |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|VM extensions |Γ£ô |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Azure Monitor |Γ£ô |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Extended Security Updates for Windows Server 2012/2012R2 |Γ£ô |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Discover & onboard VMs to Azure | |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Lifecycle operations (start/stop VMs, etc.) | |Γ£ô |Γ£ô |Γ£ô |Γ£ô | +|Self-serve VM provisioning | |Γ£ô |Γ£ô |Γ£ô |Γ£ô | ++## Switching from Arc-enabled servers to another service ++If you currently use Azure Arc-enabled servers, you can get the additional capabilities that come with Arc-enabled VMware vSphere or Arc-enabled SCVMM: ++- [Enable virtual hardware and VM CRUD capabilities in a machine with Azure Arc agent installed](/azure/azure-arc/vmware-vsphere/enable-virtual-hardware) ++- [Enable virtual hardware and VM CRUD capabilities in an SCVMM machine with Azure Arc agent installed](/azure/azure-arc/system-center-virtual-machine-manager/enable-virtual-hardware-scvmm) + |
azure-arc | Release Notes | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/data/release-notes.md | +## April 9, 2024 ++**Image tag**:`v1.29.0_2024-04-09` ++For complete release version information, review [Version log](version-log.md#april-9-2024). + ## March 12, 2024 -**Image tag**:`v1.28.0_2024-03-12`| +**Image tag**:`v1.28.0_2024-03-12` For complete release version information, review [Version log](version-log.md#march-12-2024). |
azure-arc | Version Log | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/data/version-log.md | +## April 9, 2024 ++|Component|Value| +|--|--| +|Container images tag |`v1.29.0_2024-04-09`| +|**CRD names and version:**| | +|`activedirectoryconnectors.arcdata.microsoft.com`| v1beta1, v1beta2, v1, v2| +|`datacontrollers.arcdata.microsoft.com`| v1beta1, v1 through v5| +|`exporttasks.tasks.arcdata.microsoft.com`| v1beta1, v1, v2| +|`failovergroups.sql.arcdata.microsoft.com`| v1beta1, v1beta2, v1, v2| +|`kafkas.arcdata.microsoft.com`| v1beta1 through v1beta4| +|`monitors.arcdata.microsoft.com`| v1beta1, v1, v3| +|`postgresqls.arcdata.microsoft.com`| v1beta1 through v1beta6| +|`postgresqlrestoretasks.tasks.postgresql.arcdata.microsoft.com`| v1beta1| +|`sqlmanagedinstances.sql.arcdata.microsoft.com`| v1beta1, v1 through v13| +|`sqlmanagedinstancemonitoringprofiles.arcdata.microsoft.com`| v1beta1, v1beta2| +|`sqlmanagedinstancereprovisionreplicatasks.tasks.sql.arcdata.microsoft.com`| v1beta1| +|`sqlmanagedinstancerestoretasks.tasks.sql.arcdata.microsoft.com`| v1beta1, v1| +|`telemetrycollectors.arcdata.microsoft.com`| v1beta1 through v1beta5| +|`telemetryrouters.arcdata.microsoft.com`| v1beta1 through v1beta5| +|Azure Resource Manager (ARM) API version|2023-11-01-preview| +|`arcdata` Azure CLI extension version|1.5.11 ([Download](https://aka.ms/az-cli-arcdata-ext))| +|Arc-enabled Kubernetes helm chart extension version|1.28.0| +|Azure Arc Extension for Azure Data Studio<br/>`arc`<br/>`azcli`|<br/>1.8.0 ([Download](https://aka.ms/ads-arcdata-ext))</br>1.8.0 ([Download](https://aka.ms/ads-azcli-ext))| +|SQL Database version | 964 | ++ ## March 12, 2024 |Component|Value| This article identifies the component versions with each release of Azure Arc-en |`telemetrycollectors.arcdata.microsoft.com`| v1beta1 through v1beta5| |`telemetryrouters.arcdata.microsoft.com`| v1beta1 through v1beta5| |Azure Resource Manager (ARM) API version|2023-11-01-preview|-|`arcdata` Azure CLI extension version|1.5.12 ([Download](https://aka.ms/az-cli-arcdata-ext))| -|Arc-enabled Kubernetes helm chart extension version|1.28.0| +|`arcdata` Azure CLI extension version|1.5.13 ([Download](https://aka.ms/az-cli-arcdata-ext))| +|Arc-enabled Kubernetes helm chart extension version|1.29.0| |Azure Arc Extension for Azure Data Studio<br/>`arc`<br/>`azcli`|<br/>1.8.0 ([Download](https://aka.ms/ads-arcdata-ext))</br>1.8.0 ([Download](https://aka.ms/ads-azcli-ext))| |SQL Database version | 964 | |
azure-arc | Troubleshoot Resource Bridge | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/resource-bridge/troubleshoot-resource-bridge.md | This article provides information on troubleshooting and resolving issues that c ### Logs collection -For issues encountered with Arc resource bridge, collect logs for further investigation using the Azure CLI [`az arcappliance logs`](/cli/azure/arcappliance/logs) command. This command needs to be run from the same management machine that was used to run commands to deploy the Arc resource bridge. If you are using a different machine to collect logs, you need to run the `az arcappliance get-credentials` command first before collecting logs. +For issues encountered with Arc resource bridge, collect logs for further investigation using the Azure CLI [`az arcappliance logs`](/cli/azure/arcappliance/logs) command. This command needs to be run from the same management machine that was used to run commands to deploy the Arc resource bridge. If you're using a different machine to collect logs, you need to run the `az arcappliance get-credentials` command first before collecting logs. If there's a problem collecting logs, most likely the management machine is unable to reach the Appliance VM. Contact your network administrator to allow SSH communication from the management machine to the Appliance VM on TCP port 22. To collect Arc resource bridge logs for Azure Stack HCI using the appliance VM I az arcappliance logs hci --ip <appliance VM IP> --cloudagent <cloud agent service IP/FQDN> --loginconfigfile <file path of kvatoken.tok> ``` -If you are unsure of your appliance VM IP, there is also the option to use the kubeconfig. You can retrieve the kubeconfig by running the [get-credentials command](/cli/azure/arcappliance) then run the logs command. +If you're unsure of your appliance VM IP, there's also the option to use the kubeconfig. You can retrieve the kubeconfig by running the [get-credentials command](/cli/azure/arcappliance) then run the logs command. To retrieve the kubeconfig and log key then collect logs for Arc-enabled VMware from a different machine than the one used to deploy Arc resource bridge for Arc-enabled VMware: az arcappliance logs vmware --kubeconfig kubeconfig --out-dir <path to specified ### Arc resource bridge is offline -If the resource bridge is offline, this is typically due to a networking change in the infrastructure, environment or cluster that stops the appliance VM from being able to communicate with its counterpart Azure resource. If you are unable to determine what changed, you can reboot the appliance VM, collect logs and submit a support ticket for further investigation. +If the resource bridge is offline, this is typically due to a networking change in the infrastructure, environment or cluster that stops the appliance VM from being able to communicate with its counterpart Azure resource. If you're unable to determine what changed, you can reboot the appliance VM, collect logs and submit a support ticket for further investigation. ### Remote PowerShell isn't supported To resolve this problem, delete the resource bridge, register the providers, the Arc resource bridge consists of an appliance VM that is deployed to the on-premises infrastructure. The appliance VM maintains a connection to the management endpoint of the on-premises infrastructure using locally stored credentials. If these credentials aren't updated, the resource bridge is no longer able to communicate with the management endpoint. This can cause problems when trying to upgrade the resource bridge or manage VMs through Azure. To fix this, the credentials in the appliance VM need to be updated. For more information, see [Update credentials in the appliance VM](maintenance.md#update-credentials-in-the-appliance-vm). -### Private Link is unsupported +### Private link is unsupported Arc resource bridge doesn't support private link. All calls coming from the appliance VM shouldn't be going through your private link setup. The Private Link IPs may conflict with the appliance IP pool range, which isn't configurable on the resource bridge. Arc resource bridge reaches out to [required URLs](network-requirements.md#firewallproxy-url-allowlist) that shouldn't go through a private link connection. You must deploy Arc resource bridge on a separate network segment unrelated to the private link setup. This occurs when a firewall or proxy has SSL/TLS inspection enabled and blocks h If the result is `The response ended prematurely while waiting for the next frame from the server`, then the http2 call is being blocked and needs to be allowed. Work with your network administrator to disable the SSL/TLS inspection to allow http2 calls from the machine used to deploy the bridge. -### .local not supported +### No such host - .local not supported When trying to set the configuration for Arc resource bridge, you might receive an error message similar to: `"message": "Post \"https://esx.lab.local/52c-acac707ce02c/disk-0.vmdk\": dial tcp: lookup esx.lab.local: no such host"` To resolve this issue, reboot the resource bridge VM, and it should recover its Be sure that the proxy server on your management machine trusts both the SSL certificate for your SSL proxy and the SSL certificate of the Microsoft download servers. For more information, see [SSL proxy configuration](network-requirements.md#ssl-proxy-configuration). +### No such host - dp.kubernetesconfiguration.azure.com ++An error that contains `dial tcp: lookup westeurope.dp.kubernetesconfiguration.azure.com: no such host` while deploying Arc resource bridge means that the configuration dataplane is currently unavailable in the specified region. The service may be temporarily unavailable. Please wait for the service to be available and then retry the deployment. ++### Proxy connect tcp - No such host for Arc resource bridge required URL ++An error that contains an Arc resource bridge required URL with the message `proxyconnect tcp: dial tcp: lookup http: no such host` indicates that DNS is not able to resolve the URL. The error may look similar to the example below, where the required URL is `https://msk8s.api.cdp.microsoft.com`: ++`Error: { _errorCode_: _InvalidEntityError_, _errorResponse_: _{\n\_message\_: \_Post \\\_https://msk8s.api.cdp.microsoft.com/api/v1.1/contents/default/namespaces/default/names/arc-appliance-stable-catalogs-ext/versions/latest?action=select\\\_: POST https://msk8s.api.cdp.microsoft.com/api/v1.1/contents/default/namespaces/default/names/arc-appliance-stable-catalogs-ext/versions/latest?action=select giving up after 6 attempt(s): Post \\\_https://msk8s.api.cdp.microsoft.com/api/v1.1/contents/default/namespaces/default/names/arc-appliance-stable-catalogs-ext/versions/latest?action=select\\\_: proxyconnect tcp: dial tcp: lookup http: no such host\_\n}_ }` ++This error can occur if the DNS settings provided during deployment are not correct or there is a problem with the DNS server(s). You can check if your DNS server is able to resolve the url by running the following command from the management machine or a machine that has access to the DNS server(s): ++``` +nslookup +> set debug +> <hostname> <DNS server IP> +``` ++In order to resolve the error, your DNS server(s) must be configured to resolve all Arc resource bridge required URLs and the DNS server(s) should be correctly provided during deployment of Arc resource bridge. + ### KVA timeout error -While trying to deploy Arc Resource Bridge, a "KVA timeout error" might appear. The "KVA timeout error" is a generic error that can be the result of a variety of network misconfigurations that involve the management machine, Appliance VM, or Control Plane IP not having communication with each other, to the internet, or required URLs. This communication failure is often due to issues with DNS resolution, proxy settings, network configuration, or internet access. +The KVA timeout error is a generic error that can be the result of a variety of network misconfigurations that involve the management machine, Appliance VM, or Control Plane IP not having communication with each other, to the internet, or required URLs. This communication failure is often due to issues with DNS resolution, proxy settings, network configuration, or internet access. -For clarity, "management machine" refers to the machine where deployment CLI commands are being run. "Appliance VM" is the VM that hosts Arc resource bridge. "Control Plane IP" is the IP of the control plane for the Kubernetes management cluster in the Appliance VM. +For clarity, management machine refers to the machine where deployment CLI commands are being run. Appliance VM is the VM that hosts Arc resource bridge. Control Plane IP is the IP of the control plane for the Kubernetes management cluster in the Appliance VM. #### Top causes of the KVA timeout errorΓÇ» To resolve the error, one or more network misconfigurations might need to be add Once logs are collected, extract the folder and open kva.log. Review the kva.log for more information on the failure to help pinpoint the cause of the KVA timeout error. -1. The management machine must be able to communicate with the Appliance VM IP and Control Plane IP. Ping the Control Plane IP and Appliance VM IP from the management machine and verify there is a response from both IPs. +1. The management machine must be able to communicate with the Appliance VM IP and Control Plane IP. Ping the Control Plane IP and Appliance VM IP from the management machine and verify there's a response from both IPs. If a request times out, the management machine can't communicate with the IP(s). This could be caused by a closed port, network misconfiguration or a firewall block. Work with your network administrator to allow communication between the management machine to the Control Plane IP and Appliance VM IP. To resolve the error, one or more network misconfigurations might need to be add 1. Appliance VM needs to be able to reach a DNS server that can resolve internal names such as vCenter endpoint for vSphere or cloud agent endpoint for Azure Stack HCI. The DNS server also needs to be able to resolve external/internal addresses, such as Azure service addresses and container registry names for download of the Arc resource bridge container images from the cloud. Verify that the DNS server IP used to create the configuration files has internal and external address resolution. If not, [delete the appliance](/cli/azure/arcappliance/delete), recreate the Arc resource bridge configuration files with the correct DNS server settings, and then deploy Arc resource bridge using the new configuration files.-+ ## Move Arc resource bridge location Resource move of Arc resource bridge isn't currently supported. You'll need to delete the Arc resource bridge, then re-deploy it to the desired location. To install Azure Arc resource bridge on an Azure Stack HCI cluster, `az arcappli ## Azure Arc-enabled VMware VCenter issues -### `az arcappliance prepare` failure +### vSphere SDK client 403 Forbidden or 404 not found -The `arcappliance` extension for Azure CLI enables a [prepare](/cli/azure/arcappliance/prepare) command, which enables you to download an OVA template to your vSphere environment. This OVA file is used to deploy the Azure Arc resource bridge. The `az arcappliance prepare` command uses the vSphere SDK and can result in the following error: +If you receive an error that contains `errorCode_: _CreateConfigKvaCustomerError_, _errorResponse_: _error getting the vsphere sdk client: POST \_/sdk\_: 403 Forbidden` or `404 not found` while deploying Arc resource bridge, this is most likely due to an incorrect vCenter URL being provided during configuration file creation where you're prompted to enter the vCenter address as either FQDN or IP address. There are different ways to find your vCenter address. One option is to access the vSphere client via its web interface. The vCenter FQDN or IP address is typically what you use in the browser to access the vSphere client. If you're already logged in, you can look at the browser's address bar; the URL you use to access vSphere is your vCenter server's FQDN or IP address. Alternatively, after logging in, go to the Menu > Administration section. Under System Configuration, choose Nodes. Your vCenter server instance(s) will be listed there along with its FQDN. Verify your vCenter address and then re-try the deployment. -```azurecli -$ az arcappliance prepare vmware --config-file <path to config> +### Pre-deployment validation errors -Error: Error in reading OVA file: failed to parse ovf: strconv.ParseInt: parsing "3670409216": -value out of range. -``` +If you're receiving a variety of `pre-deployment validation of your download\upload connectivity wasn't successful` errors, such as: ++`Pre-deployment validation of your download/upload connectivity wasn't successful. {\\n \\\_code\\\_: \\\_ImageProvisionError\\\_,\\n \\\_message\\\_: \\\_Post \\\\\\\_https://vcenter-server.com/nfc/unique-identifier/disk-0.vmdk\\\\\\\_: Service Unavailable` ++`Pre-deployment validation of your download/upload connectivity wasn't successful. {\\n \\\_code\\\_: \\\_ImageProvisionError\\\_,\\n \\\_message\\\_: \\\_Post \\\\\\\_https://vcenter-server.com/nfc/unique-identifier/disk-0.vmdk\\\\\\\_: dial tcp 172.16.60.10:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.` ++`Pre-deployment validation of your download/upload connectivity wasn't successful. {\\n \\\_code\\\_: \\\_ImageProvisionError\\\_,\\n \\\_message\\\_: \\\_Post \\\\\\\_https://vcenter-server.com/nfc/unique-identifier/disk-0.vmdk\\\\\\\_: use of closed network connection.` ++`Pre-deployment validation of your download/upload connectivity wasn't successful. {\\n \\\_code\\\_: \\\_ImageProvisionError\\\_,\\n \\\_message\\\_: \\\_Post \\\\\\\_https://vcenter-server.com/nfc/unique-identifier/disk-0.vmdk\\\\\\\_: dial tcp: lookup hostname.domain: no such host` ++A combination of these errors usually indicates that the management machine has lost connection to the datastore or there's a networking issue causing the datastore to be unreachable. This connection is needed in order to upload the OVA from the management machine used to build the appliance VM in vCenter. The connection between the management machine and datastore needs to be reestablished, then retry deployment of Arc resource bridge. ++### x509 certificate has expired or isn't yet valid ++When you deploy Arc resource bridge, you may encounter the error: ++`Error: { _errorCode_: _PostOperationsError_, _errorResponse_: _{\n\_message\_: \_{\\n \\\_code\\\_: \\\_GuestInternetConnectivityError\\\_,\\n \\\_message\\\_: \\\_Not able to connect to https://msk8s.api.cdp.microsoft.com. Error returned: action failed after 3 attempts: Get \\\\\\\_https://msk8s.api.cdp.microsoft.com\\\\\\\_: x509: certificate has expired or isn't yet valid: current time 2022-01-18T11:35:56Z is before 2023-09-07T19:13:21Z. Arc Resource Bridge network and internet connectivity validation failed: http-connectivity-test-arc. 1. Please check your networking setup and ensure the URLs mentioned in : https://aka.ms/AAla73m are reachable from the Appliance VM. 2. Check firewall/proxy settings` -This error occurs when you run the Azure CLI commands in a 32-bit context, which is the default behavior. The vSphere SDK only supports running in a 64-bit context. The specific error returned from the vSphere SDK is `Unable to import ova of size 6GB using govc`. To resolve the error, install and use Azure CLI 64-bit. +This error is caused when there's a clock/time difference between ESXi host(s) and the management machine where the deployment commands for Arc resource bridge are being executed. To resolve this issue, turn on NTP time sync on the ESXi host(s) and confirm that the management machine is also synced to NTP, then try the deployment again. ### Error during host configuration -When you deploy the resource bridge on VMware vCenter, if you have been using the same template to deploy and delete the appliance multiple times, you might encounter the following error: +If you have been using the same template to deploy and delete the Arc resource bridge multiple times, you might encounter the following error: -`Appliance cluster deployment failed with error: -Error: An error occurred during host configuration` +`Appliance cluster deployment failed with error: Error: An error occurred during host configuration` -To resolve this issue, delete the existing template manually. Then run [`az arcappliance prepare`](/cli/azure/arcappliance/prepare) to download a new template for deployment. +To resolve this issue, manually delete the existing template. Then run [`az arcappliance prepare`](/cli/azure/arcappliance/prepare) to download a new template for deployment. ### Unable to find folders -When deploying the resource bridge on VMware vCenter, you specify the folder in which the template and VM will be created. The folder must be VM and template folder type. Other types of folder, such as storage folders, network folders, or host and cluster folders, can't be used by the resource bridge deployment. +When deploying the resource bridge on VMware vCenter, you specify the folder in which the template and VM will be created. The folder must be VM and template folder type. Other types of folder, such as storage folders, network folders, or host and cluster folders, can't be used for the resource bridge deployment. ### Insufficient permissions |
azure-arc | Billing Extended Security Updates | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/servers/billing-extended-security-updates.md | Title: Billing service for Extended Security Updates for Windows Server 2012 through Azure Arc description: Learn about billing services for Extended Security Updates for Windows Server 2012 enabled by Azure Arc. Previously updated : 12/19/2023 Last updated : 04/10/2023 # Billing service for Extended Security Updates for Windows Server 2012 enabled by Azure Arc -Billing for Extended Security Updates (ESUs) is impacted by three factors: +Three factors impact billing for Extended Security Updates (ESUs): -- The number of cores you've provisioned+- The number of cores provisioned - The edition of the license (Standard vs. Datacenter) - The application of any eligible discounts -Billing is monthly. Decrementing, deactivating, or deleting a license will result in charges for up to five more calendar days from the time of decrement, deactivation, or deletion. Reduction in billing isn't immediate. This is an Azure-billed service and can be used to decrement a customer's Microsoft Azure Consumption Commitment (MACC) and be eligible for Azure Consumption Discount (ACD). +Billing is monthly. Decrementing, deactivating, or deleting a license results in charges for up to five more calendar days from the time of decrement, deactivation, or deletion. Reduction in billing isn't immediate. This is an Azure-billed service and can be used to decrement a customer's Microsoft Azure Consumption Commitment (MACC) and be eligible for Azure Consumption Discount (ACD). > [!NOTE] > Licenses or additional cores provisioned after End of Support are subject to a one-time back-billing charge during the month in which the license was provisioned. This isn't reflective of the recurring monthly bill. ## Back-billing for ESUs enabled by Azure Arc -Licenses that are provisioned after the End of Support (EOS) date of October 10, 2023 are charged a back bill for the time elapsed since the EOS date. For example, an ESU license provisioned in December 2023 will be back-billed for October and November upon provisioning. Enrolling late in WS2012 ESUs makes you eligible for all the critical security patches up to that point. The back-billing charge reflects the value of these critical security patches. +Licenses that are provisioned after the End of Support (EOS) date of October 10, 2023 are charged a back bill for the time elapsed since the EOS date. For example, an ESU license provisioned in December 2023 is back-billed for October and November upon provisioning. Enrolling late in WS2012 ESUs makes you eligible for all the critical security patches up to that point. The back-billing charge reflects the value of these critical security patches. -If you deactivate and then later reactivate a license, you'll be billed for the window during which the license was deactivated. It isn't possible to evade charges by deactivating a license before a critical security patch and reactivating it shortly before. +If you deactivate and then later reactivate a license, you're billed for the window during which the license was deactivated. It isn't possible to evade charges by deactivating a license before a critical security patch and reactivating it shortly before. ++If the region of an ESU license is changed, this will be subject to back-billing charges. > [!NOTE] > The back-billing cost appears as a separate line item in invoicing. If you acquired a discount for your core WS2012 ESUs enabled by Azure Arc, the same discount may or may not apply to back-billing. You should verify that the same discounting, if applicable, has been applied to back-billing charges as well. |
azure-arc | Deliver Extended Security Updates | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/servers/deliver-extended-security-updates.md | Azure policies can be specified to a targeted subscription or resource group for ## Additional scenarios -There are some scenarios in which you may be eligible to receive Extended Security Updates patches at no additional cost. Two of these scenarios supported by Azure Arc are (1) [Dev/Test (Visual Studio)](/azure/devtest/offer/overview-what-is-devtest-offer-visual-studio) and (2) [Disaster Recovery (Entitled benefit DR instances from Software Assurance](https://www.microsoft.com/en-us/licensing/licensing-programs/software-assurance-by-benefits) or subscription only). Both of these scenarios require the customer is already using Windows Server 2012/R2 ESUs enabled by Azure Arc for billable, production machines. +There are some scenarios in which you may be eligible to receive Extended Security Updates patches at no additional cost. Two of these scenarios supported by Azure Arc are (1) [Dev/Test (Visual Studio)](license-extended-security-updates.md#visual-studio-subscription-benefit-for-devtest-scenarios) and (2) [Disaster Recovery (Entitled benefit DR instances from Software Assurance](https://www.microsoft.com/en-us/licensing/licensing-programs/software-assurance-by-benefits) or subscription only. Both of these scenarios require the customer is already using Windows Server 2012/R2 ESUs enabled by Azure Arc for billable, production machines. > [!WARNING] > Don't create a Windows Server 2012/R2 ESU License for only Dev/Test or Disaster Recovery workloads. You shouldn't provision an ESU License only for non-billable workloads. Moreover, you'll be billed fully for all of the cores provisioned with an ESU license, and any dev/test cores on the license won't be billed as long as they're tagged accordingly based on the following qualifications.-> + To qualify for these scenarios, you must already have: - **Billable ESU License.** You must already have provisioned and activated a WS2012 Arc ESU License intended to be linked to regular Azure Arc-enabled servers running in production environments (i.e., normally billed ESU scenarios). This license should be provisioned only for billable cores, not cores that are eligible for free Extended Security Updates, for example, dev/test cores. This linking won't trigger a compliance violation or enforcement block, allowing > Adding these tags to your license will NOT make the license free or reduce the number of license cores that are chargeable. These tags allow you to link your Azure machines to existing licenses that are already configured with payable cores without needing to create any new licenses or add additional cores to your free machines. **Example:**-- You have 8 Windows Server 2012 R2 Standard instances, each with 8 physical cores. Six of these Windows Server 2012 R2 Standard machines are for production, and 2 of these Windows Server 2012 R2 Standard machines are eligible for free ESUs through the Visual Studio Dev Test subscription.+- You have 8 Windows Server 2012 R2 Standard instances, each with 8 physical cores. Six of these Windows Server 2012 R2 Standard machines are for production, and 2 of these Windows Server 2012 R2 Standard machines are eligible for free ESUs because the operating system was licensed through a Visual Studio Dev Test subscription. - You should first provision and activate a regular ESU License for Windows Server 2012/R2 that's Standard edition and has 48 physical cores to cover the 6 production machines. You should link this regular, production ESU license to your 6 production servers. - Next, you should reuse this existing license, don't add any more cores or provision a separate license, and link this license to your 2 non-production Windows Server 2012 R2 standard machines. You should tag the ESU license and the 2 non-production Windows Server 2012 R2 Standard machines with Name: "ESU Usage" and Value: "WS2012 VISUAL STUDIO DEV TEST". - This will result in an ESU license for 48 cores, and you'll be billed for those 48 cores. You won't be charged for the additional 16 cores of the dev test servers that you added to this license, as long as the ESU license and the dev test server resources are tagged appropriately. > [!NOTE]-> You needed a regular production license to start with, and you'll be billed only for the production cores. -> +> You needed a regular production license to start with, and you'll be billed only for the production cores. ## Upgrading from Windows Server 2012/2012 R2 |
azure-arc | Deploy Ama Policy | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/servers/deploy-ama-policy.md | In order for Azure Policy to check if AMA is installed on your Arc-enabled, you' - Enforces a remediation task to install the AMA and create the association with the DCR on VMs that aren't compliant with the policy. 1. Select one of the following policy definition templates (that is, for Windows or Linux machines):- - [Configure Windows machines](https://ms.portal.azure.com/#view/Microsoft_Azure_Policy/CreateAssignmentBladeV2/assignMode~/0/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F9575b8b7-78ab-4281-b53b-d3c1ace2260b) - - [Configure Linux machines](https://ms.portal.azure.com/#view/Microsoft_Azure_Policy/InitiativeDetailBlade/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F118f04da-0375-44d1-84e3-0fd9e1849403/scopes~/%5B%22%2Fsubscriptions%2Fd05f0ffc-ace9-4dfc-bd6d-d9ec0a212d16%22%2C%22%2Fsubscriptions%2F6e967edb-425b-4a33-ae98-f1d2c509dda3%22%2C%22%2Fsubscriptions%2F5f2bd58b-42fc-41da-bf41-58690c193aeb%22%2C%22%2Fsubscriptions%2F2dad32d6-b188-49e6-9437-ca1d51cec4dd%22%5D) + - [Configure Windows machines](https://portal.azure.com/#view/Microsoft_Azure_Policy/InitiativeDetail.ReactView/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F9575b8b7-78ab-4281-b53b-d3c1ace2260b/scopes/undefined) + - [Configure Linux machines](https://portal.azure.com/#view/Microsoft_Azure_Policy/InitiativeDetail.ReactView/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F118f04da-0375-44d1-84e3-0fd9e1849403/scopes/undefined) These templates are used to create a policy to configure machines to run Azure Monitor Agent and associate those machines to a DCR. |
azure-arc | License Extended Security Updates | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/servers/license-extended-security-updates.md | When provisioning WS2012 ESU licenses, you need to specify: * Either virtual core or physical core license * Standard or Datacenter license -You'll also need to attest to the number of associated cores (broken down by the number of 2-core and 16-core packs). +You also need to attest to the number of associated cores (broken down by the number of 2-core and 16-core packs). To assist with the license provisioning process, this article provides general guidance and sample customer scenarios for planning your deployment of WS2012 ESUs through Azure Arc. If you choose to license based on virtual cores, the licensing requires a minimu 1. The Windows Server operating system was licensed on a virtualization basis. -An additional scenario (scenario 1, below) is a candidate for VM/Virtual core licensing when the WS2012 VMs are running on a newer Windows Server host (that is, Windows Server 2016 or later). +Another scenario (scenario 1, below) is a candidate for VM/Virtual core licensing when the WS2012 VMs are running on a newer Windows Server host (that is, Windows Server 2016 or later). > [!IMPORTANT] > Virtual core licensing can't be used on physical servers. When creating a license with virtual cores, always select the standard edition instead of datacenter, even if the operating system is datacenter edition. ### License limits -Each WS2012 ESU license can cover up to and including 10,000 cores. If you need ESUs for more than 10,000 cores, split the total number of cores across multiple licenses. Additionally, only 800 licenses can be created in a single resource group. Use additional resource groups if you need to create more than 800 license resources. +Each WS2012 ESU license can cover up to and including 10,000 cores. If you need ESUs for more than 10,000 cores, split the total number of cores across multiple licenses. Additionally, only 800 licenses can be created in a single resource group. Use more resource groups if you need to create more than 800 license resources. ### SA/SPLA conformance -In all cases, you're required to attest to conformance with SA or SPLA. There is no exception for these requirements. Software Assurance or an equivalent Server Subscription is required for you to purchase Extended Security Updates on-premises and in hosted environments. You will be able to purchase Extended Security Updates from Enterprise Agreement (EA), Enterprise Subscription Agreement (EAS), a Server & Cloud Enrollment (SCE), and Enrollment for Education Solutions (EES). On Azure, you do not need Software Assurance to get free Extended Security Updates, but Software Assurance or Server Subscription is required to take advantage of the Azure Hybrid Benefit. +In all cases, you're required to attest to conformance with SA or SPLA. There is no exception for these requirements. Software Assurance or an equivalent Server Subscription is required for you to purchase Extended Security Updates on-premises and in hosted environments. You are able to purchase Extended Security Updates from Enterprise Agreement (EA), Enterprise Subscription Agreement (EAS), a Server & Cloud Enrollment (SCE), and Enrollment for Education Solutions (EES). On Azure, you do not need Software Assurance to get free Extended Security Updates, but Software Assurance or Server Subscription is required to take advantage of the Azure Hybrid Benefit. ++### Visual Studio subscription benefit for dev/test scenarios ++Visual Studio subscriptions [allow developers to get product keys](/visualstudio/subscriptions/product-keys) for Windows Server at no extra cost to help them develop and test their software. If a Windows Server 2012 server's operating system is licensed through a product key obtained from a Visual Studio subscription, you can also get extended security updates for these servers at no extra cost. To configure ESU licenses for these servers using Azure Arc, you must have at least one server with paid ESU usage. You can't create an ESU license where all associated servers are entitled to the Visual Studio subscription benefit. See [additional scenarios](deliver-extended-security-updates.md#additional-scenarios) in the deployment article for more information on how to provision an ESU license correctly for this scenario. ++Development, test, and other non-production servers that have a paid operating system license (from your organization's volume licensing key, for example) **must** use a paid ESU license. The only dev/test servers entitled to ESU licenses at no extra cost are those whose operating system licenses came from a Visual Studio subscription. ## Cost savings with migration and modernization of workloads |
azure-arc | Onboard Windows Server | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/servers/onboard-windows-server.md | Title: Connect Windows Server machines to Azure through Azure Arc Setup description: In this article, you learn how to connect Windows Server machines to Azure Arc using the built-in Windows Server Azure Arc Setup wizard. Previously updated : 10/12/2023 Last updated : 04/05/2024 Windows Server machines can be onboarded directly to [Azure Arc](https://azure.m Onboarding to Azure Arc is not needed if the Windows Server machine is already running in Azure. +For Windows Server 2022, Azure Arc Setup is an optional component that can be removed using the **Remove Roles and Features Wizard**. For Windows Server 2025 and later, Azure Arc Setup is a [Features On Demand](/windows-hardware/manufacture/desktop/features-on-demand-v2--capabilities?view=windows-11). Essentially, this means that the procedures for removal and enablement differ between OS versions. See for more information. + > [!NOTE]-> This feature only applies to Windows Server 2022 and later. It was released in the [Cumulative Update of 10/10/2023](https://support.microsoft.com/en-us/topic/october-10-2023-kb5031364-os-build-20348-2031-7f1d69e7-c468-4566-887a-1902af791bbc). +> The Azure Arc Setup feature only applies to Windows Server 2022 and later. It was released in the [Cumulative Update of 10/10/2023](https://support.microsoft.com/en-us/topic/october-10-2023-kb5031364-os-build-20348-2031-7f1d69e7-c468-4566-887a-1902af791bbc). > ## Prerequisites The Azure Arc system tray icon at the bottom of your Windows Server machine indi ## Uninstalling Azure Arc Setup -To uninstall Azure Arc Setup, follow these steps: +> [!NOTE] +> Uninstalling Azure Arc Setup does not uninstall the Azure Connected Machine agent from the machine. For instructions on uninstalling the agent, see [Managing and maintaining the Connected Machine agent](manage-agent.md). +> +To uninstall Azure Arc Setup from a Windows Server 2022 machine: -1. In the Server Manager, navigate to the **Remove Roles and Features Wizard**. (See [Remove roles, role services, and features by using the remove Roles and Features Wizard](/windows-server/administration/server-manager/install-or-uninstall-roles-role-services-or-features#remove-roles-role-services-and-features-by-using-the-remove-roles-and-features-wizard) for more information.) +1. In the Server Manager, navigate to the **Remove Roles and Features Wizard**. (See [Remove roles, role services, and features by using the Remove Roles and Features Wizard](/windows-server/administration/server-manager/install-or-uninstall-roles-role-services-or-features#remove-roles-role-services-and-features-by-using-the-remove-roles-and-features-wizard) for more information.) 1. On the Features page, uncheck the box for **Azure Arc Setup**. To uninstall Azure Arc Setup through PowerShell, run the following command: Disable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup ``` -> [!NOTE] -> Uninstalling Azure Arc Setup does not uninstall the Azure Connected Machine agent from the machine. For instructions on uninstalling the agent, see [Managing and maintaining the Connected Machine agent](manage-agent.md). -> +To uninstall Azure Arc Setup from a Windows Server 2025 machine: ++1. Open the Settings app on the machine and select **System**, then select **Optional features**. ++1. Select **AzureArcSetup**, and then select **Remove**. +++To uninstall Azure Arc Setup from a Windows Server 2025 machine from the command line, run the following line of code: ++`DISM /online /Remove-Capability /CapabilityName:AzureArcSetup~~~~` ## Next steps |
azure-arc | Overview | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/servers/overview.md | You can install the Connected Machine agent manually, or on multiple machines at [!INCLUDE [azure-lighthouse-supported-service](../../../includes/azure-lighthouse-supported-service.md)] +> [!NOTE] +> For additional guidance regarding the different services Azure Arc offers, see [Choosing the right Azure Arc service for machines](../choose-service.md). +> + ## Supported cloud operations When you connect your machine to Azure Arc-enabled servers, you can perform many operational functions, just as you would with native Azure virtual machines. Below are some of the key supported actions for connected machines. |
azure-arc | Ssh Arc Powershell Remoting | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-arc/servers/ssh-arc-powershell-remoting.md | + + Title: SSH access to Azure Arc-enabled servers with PowerShell remoting +description: Use PowerShell remoting over SSH to access and manage Azure Arc-enabled servers. Last updated : 04/08/2024+++++# PowerShell remoting to Azure Arc-enabled servers +SSH for Arc-enabled servers enables SSH based connections to Arc-enabled servers without requiring a public IP address or additional open ports. +[PowerShell remoting over SSH](/powershell/scripting/security/remoting/ssh-remoting-in-powershell) is available for Windows and Linux machines. ++## Prerequisites +To leverage PowerShell remoting over SSH access to Azure Arc-enabled servers, ensure the following: + - Ensure the requirements for SSH access to Azure Arc-enabled servers are met. + - Ensure the requirements for PowerShell remoting over SSH are met. + - The Azure PowerShell module or the Azure CLI extension for connecting to Arc machines is present on the client machine. ++## How to connect via PowerShell remoting +Follow the below steps to connect via PowerShell remoting to an Arc-enabled server. ++#### [Generate a SSH config file with Azure CLI:](#tab/azure-cli) +```bash +az ssh config --resource-group <myRG> --name <myMachine> --local-user <localUser> --resource-type Microsoft.HybridCompute --file <SSH config file> +``` + +#### [Generate a SSH config file with Azure PowerShell:](#tab/azure-powershell) + ```powershell +Export-AzSshConfig -ResourceGroupName <myRG> -Name <myMachine> -LocalUser <localUser> -ResourceType Microsoft.HybridCompute/machines -ConfigFilePath <SSH config file> +``` + ++#### Find newly created entry in the SSH config file +Open the created or modified SSH config file. The entry should have a similar format to the following. +```powershell +Host <myRG>-<myMachine>-<localUser> + HostName <myMachine> + User <localUser> + ProxyCommand "<path to proxy>\.clientsshproxy\sshProxy_windows_amd64_1_3_022941.exe" -r "<path to relay info>\az_ssh_config\<myRG>-<myMachine>\<myRG>-<myMachine>-relay_info" +``` +#### Leveraging the -Options parameter +Levering the [options](/powershell/module/microsoft.powershell.core/new-pssession#-options) parameter allows you to specify a hashtable of SSH options used when connecting to a remote SSH-based session. +Create the hashtable by following the below format. Be mindful of the locations of quotation marks. +```powershell +$options = @{ProxyCommand = '"<path to proxy>\.clientsshproxy\sshProxy_windows_amd64_1_3_022941.exe -r <path to relay info>\az_ssh_config\<myRG>-<myMachine>\<myRG>-<myMachine>-relay_info"'} +``` +Next leverage the options hashtable in a PowerShell remoting command. +```powershell +New-PSSession -HostName <myMachine> -UserName <localUser> -Options $options +``` ++## Next steps ++- Learn about [OpenSSH for Windows](/windows-server/administration/openssh/openssh_overview) +- Learn about troubleshooting [SSH access to Azure Arc-enabled servers](ssh-arc-troubleshoot.md). +- Learn about troubleshooting [agent connection issues](troubleshoot-agent-onboard.md). |
azure-cache-for-redis | Cache Azure Active Directory For Authentication | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-cache-for-redis/cache-azure-active-directory-for-authentication.md | To use the ACL integration, your client application must assume the identity of > [!IMPORTANT] > Once the enable operation is complete, the nodes in your cache instance reboots to load the new configuration. We recommend performing this operation during your maintenance window or outside your peak business hours. The operation can take up to 30 minutes. +For information on using Microsoft Entra ID with Azure CLI, see the [references pages for identity](/cli/azure/redis/identity). + ## Using data access configuration with your cache If you would like to use a custom access policy instead of Redis Data Owner, go to the **Data Access Configuration** on the Resource menu. For more information, see [Configure a custom data access policy for your application](cache-configure-role-based-access-control.md#configure-a-custom-data-access-policy-for-your-application). The following table includes links to code samples, which demonstrate how to con - When calling the Redis server `AUTH` command periodically, consider adding a jitter so that the `AUTH` commands are staggered, and your Redis server doesn't receive lot of `AUTH` commands at the same time. -## Next steps +## Related content - [Configure role-based access control with Data Access Policy](cache-configure-role-based-access-control.md)+- [Reference pages for identity](/cli/azure/redis/identity) + |
azure-cache-for-redis | Cache Best Practices Enterprise Tiers | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-cache-for-redis/cache-best-practices-enterprise-tiers.md | You might also see `CROSSSLOT` errors with Enterprise clustering policy. Only th In Active-Active databases, multi-key write commands (`DEL`, `MSET`, `UNLINK`) can only be run on keys that are in the same slot. However, the following multi-key commands are allowed across slots in Active-Active databases: `MGET`, `EXISTS`, and `TOUCH`. For more information, see [Database clustering](https://docs.redis.com/latest/rs/databases/durability-ha/clustering/#multikey-operations). +## Enterprise Flash Best Practices +The Enterprise Flash tier utilizes both NVMe Flash storage and RAM. Because Flash storage is lower cost, using the Enterprise Flash tier allows you to trade off some performance for price efficiency. ++On Enterprise Flash instances, 20% of the cache space is on RAM, while the other 80% uses Flash storage. All of the _keys_ are stored on RAM, while the _values_ can be stored either in Flash storage or RAM. The location of the values is determined intelligently by the Redis software. "Hot" values that are accessed fequently are stored on RAM, while "Cold" values that are less commonly used are kept on Flash. Before data is read or written, it must be moved to RAM, becoming "Hot" data. ++Because Redis will optmize for the best performance, the instance will first fill up the available RAM before adding items to Flash storage. This has a few implications for performance: +- When testing with low memory usage, performance and latency may be significantly better than with a full cache instance because only RAM is being used. +- As you write more data to the cache, the proportion of data in RAM compared to Flash storage will decrease, typically causing latency and throughput performance to decrease as well. ++### Workloads well-suited for the Enterprise Flash tier +Workloads that are likely to run well on the Enterprise Flash tier often have the following characteristics: +- Read heavy, with a high ratio of read commands to write commands. +- Access is focused on a subset of keys which are used much more frequently than the rest of the dataset. +- Relatively large values in comparison to key names. (Since key names are always stored in RAM, this can become a bottleneck for memory growth.) ++### Workloads that are not well-suited for the Enterprise Flash tier +Some workloads have access characteristics that are less optimized for the design of the Flash tier: +- Write heavy workloads. +- Random or uniform data access paterns across most of the dataset. +- Long key names with relatively small value sizes. + ## Handling Region Down Scenarios with Active Geo-Replication Active geo-replication is a powerful feature to dramatically boost availability when using the Enterprise tiers of Azure Cache for Redis. You should take steps, however, to prepare your caches if there's a regional outage. |
azure-cache-for-redis | Cache How To Import Export Data | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-cache-for-redis/cache-how-to-import-export-data.md | Export allows you to export the data stored in Azure Cache for Redis to Redis co > - Export works with page blobs that are supported by both classic and Resource Manager storage accounts. > - Azure Cache for Redis does not support exporting to ADLS Gen2 storage accounts. > - Export is not supported by Blob storage accounts at this time.- > - If your cache data export to Firewall-enabled storage accounts fails, refer to [How to export if I have firewall enabled on my storage account?](#how-to-export-if-i-have-firewall-enabled-on-my-storage-account) + > - If your cache data export to Firewall-enabled storage accounts fails, refer to [What if I have firewall enabled on my storage account?](#what-if-i-have-firewall-enabled-on-my-storage-account) > > For more information, see [Azure storage account overview](../storage/common/storage-account-overview.md). > This section contains frequently asked questions about the Import/Export feature - [Can I automate Import/Export using PowerShell, CLI, or other management clients?](#can-i-automate-importexport-using-powershell-cli-or-other-management-clients) - [I received a timeout error during my Import/Export operation. What does it mean?](#i-received-a-timeout-error-during-my-importexport-operation-what-does-it-mean) - [I got an error when exporting my data to Azure Blob Storage. What happened?](#i-got-an-error-when-exporting-my-data-to-azure-blob-storage-what-happened)-- [How to export if I have firewall enabled on my storage account?](#how-to-export-if-i-have-firewall-enabled-on-my-storage-account)+- [What if I have firewall enabled on my storage account?](#what-if-i-have-firewall-enabled-on-my-storage-account) - [Can I import or export data from a storage account in a different subscription than my cache?](#can-i-import-or-export-data-from-a-storage-account-in-a-different-subscription-than-my-cache) - [Which permissions need to be granted to the storage account container shared access signature (SAS) token to allow export?](#which-permissions-need-to-be-granted-to-the-storage-account-container-shared-access-signature-sas-token-to-allow-export) To resolve this error, start the import or export operation before 15 minutes ha Export works only with RDB files stored as page blobs. Other blob types aren't currently supported, including Blob storage accounts with hot and cool tiers. For more information, see [Azure storage account overview](../storage/common/storage-account-overview.md). If you're using an access key to authenticate a storage account, having firewall exceptions on the storage account tends to cause the import/export process to fail. -### How to export if I have firewall enabled on my storage account? +### What if I have firewall enabled on my storage account? -For firewall enabled storage accounts, we need to check ΓÇ£Allow Azure services on the trusted services list to access this storage accountΓÇ¥ then, use managed identity (System/User assigned) and provision Storage Blob Data Contributor RBAC role for that object ID. +If using a _Premium_ tier instance, you need to check ΓÇ£Allow Azure services on the trusted services list to access this storage accountΓÇ¥ in your storage account settings. Then, use managed identity (System or User assigned) and provision Storage Blob Data Contributor RBAC role for that object ID. -More information here - [Managed identity for storage accounts - Azure Cache for Redis](cache-managed-identity.md) +For more information, see [managed identity for storage accounts - Azure Cache for Redis](cache-managed-identity.md) ++_Enterprise_ and _Enterprise Flash_ instances do not support importing from or exporting data to storage accounts that are using firewalls or private endpoints. The storage account must have public network access. ### Can I import or export data from a storage account in a different subscription than my cache? |
azure-cache-for-redis | Cache Managed Identity | https://github.com/MicrosoftDocs/azure-docs/commits/main/articles/azure-cache-for-redis/cache-managed-identity.md | Presently, Azure Cache for Redis can use a managed identity to connect with a st Managed identity lets you simplify the process of securely connecting to your chosen storage account for these tasks. - > [!NOTE] - > This functionality does not yet support authentication for connecting to a cache instance. - > - Azure Cache for Redis supports [both types of managed identity](../active-directory/managed-identities-azure-resources/overview.md): -- **System-assigned identity** is specific to the resource. In this case, the cache is the resource. When the cache is deleted, the identity is deleted.+- **System-assigned identity** is specific to the resource. In this case, the cache is the resource. When the cache is deleted, the identi |