-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Form Recognizer] Sovereign clouds support #20522
Changes from 1 commit
c01f303
1e224f2
6fb733c
4b60789
1396d04
e5bfacc
31d73e0
0a2fd3f
72b494d
202f01c
118a7c7
9b85338
cd5f600
6a6ebf4
8339675
4f91175
8a72062
5e7fbd8
9d5e322
b748056
61a3a1d
10acd7d
b6c7973
51efcf7
d22872a
4929132
764c398
014da41
acf524d
cde7237
89f473b
143ae75
5326004
baee1b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,21 @@ | |
|
||
/** | ||
* Defines known cloud audiences for Form Recognizer. | ||
* | ||
* --- More about national clouds --- | ||
* | ||
* National clouds are physically isolated instances of Azure. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some more comments on this section:
/**
* Defines the known cloud audiences for Form Recognizer.
*
* To authenticate with Azure Active Directory (using a `TokenCredential`) in a [Sovereign Cloud](<link here>)
* environment, provide the appropriate value below as the `audience` option when creating a
* `DocumentAnalysisClient` or `DocumentModelAdministrationClient`.
*
* The default value is suitable for Form Recognizer resources created in the Azure Public Cloud, so this value
* is only required to use Form Recognizer in a different cloud environment.
*/ |
||
* These regions of Azure are designed to make sure that data residency, sovereignty, and compliance requirements are honored within geographical boundaries. | ||
* | ||
* For more information, refer https://docs.microsoft.com/azure/active-directory/develop/authentication-national-cloud. | ||
* | ||
* As of now, FormRecognizer supports the following audiences. | ||
* | ||
* ------- | ||
* | ||
* For authentication with Azure Active Directory, use this as "audience" as part of the constructor client options. | ||
* | ||
* You should only need this to be set as "audience" if you are using AAD/token credential and if you are using a cloud other than the `AzurePublicCloud`(default). | ||
*/ | ||
export enum FormRecognizerAudience { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this not publicly exported? I don't see it in the APIView There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh shoot, I did wonder, but didn't realize. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
/** Azure China */ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,11 @@ export interface FormRecognizerCommonClientOptions extends CommonClientOptions { | |
apiVersion?: FormRecognizerApiVersion; | ||
/** | ||
* Gets or sets the audience to use for authentication with Azure Active Directory. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The doc string would be clearer if it communicated that it is only necessary to override this setting if you're 1. using AAD/TokenCredential and 2. are using a cloud other than Azure Public. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gets/sets feels out of place for a property of an object that is consumed by the client constructor. Setting it after the fact won't change the scope used, right? The rest of this doc string is great, but for the first line, how about just: "The audience (scope) to use for authentication with Azure Active Directory." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Copied this from some other package. |
||
* Setting this option is only necessary | ||
* - if you are using AAD/token credential | ||
* (and) | ||
* - if you are using a cloud other than the `AzurePublicCloud` ("https://cognitiveservices.azure.com/.default") | ||
* | ||
* The authentication scope will be set from this audience. | ||
* See {@link FormRecognizerAudience} for known audience values. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be helpful to customers to have a brief description of what this means, practically speaking.