-
Notifications
You must be signed in to change notification settings - Fork 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
Arch board review feedback for ACR #21913
Changes from 4 commits
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 |
---|---|---|
|
@@ -30,13 +30,11 @@ | |
* the desired client. | ||
* | ||
* <p>The client needs the service endpoint of the Azure Container Registry and Azure access credentials. | ||
* <p><strong>Instantiating an asynchronous {@link ContainerRegistryAsyncClient}</strong></p> | ||
* <p><strong>Instantiating an asynchronous Container Registry client</strong></p> | ||
* {@codesnippet com.azure.containers.containerregistry.ContainerRegistryAsyncClient.instantiation} | ||
* | ||
* {@codesnippet com.azure.containers.containerregistry.async.repository.instantiation} | ||
* | ||
* <p><strong>Instantiating a synchronous Configuration Client</strong></p> | ||
* | ||
* {@codesnippet com.azure.containers.containerregistry.repository.instantiation} | ||
* <p><strong>Instantiating a synchronous Container Registry client</strong></p> | ||
* {@codesnippet com.azure.containers.containerregistry.ContainerRegistryClient.instantiation} | ||
* | ||
* <p>Another way to construct the client is using a {@link HttpPipeline}. The pipeline gives the client an | ||
* authenticated way to communicate with the service but it doesn't contain the service endpoint. Set the pipeline with | ||
|
@@ -48,13 +46,11 @@ | |
* would need to provide implementation for this policy as well. | ||
* For more information please see <a href="https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md"> Azure Container Registry Authentication </a>.</p> | ||
* | ||
* <p><strong>Instantiating an asynchronous {@link ContainerRegistryAsyncClient}</strong></p> | ||
* | ||
* {@codesnippet com.azure.containers.containerregistry.async.repository.pipeline.instantiation} | ||
* | ||
* <p><strong>Instantiating a synchronous Configuration Client</strong></p> | ||
* <p><strong>Instantiating an asynchronous Container Registry client using a custom pipeline</strong></p> | ||
* {@codesnippet com.azure.containers.containerregistry.ContainerRegistryAsyncClient.pipeline.instantiation} | ||
* | ||
* {@codesnippet com.azure.containers.containerregistry.repository.pipeline.instantiation} | ||
* <p><strong>Instantiating a synchronous Container Registry client with custom pipeline</strong></p> | ||
* {@codesnippet com.azure.containers.containerregistry.ContainerRegistryClient.pipeline.instantiation} | ||
* | ||
* | ||
* @see ContainerRegistryAsyncClient | ||
|
@@ -88,6 +84,7 @@ public final class ContainerRegistryClientBuilder { | |
private HttpLogOptions httpLogOptions; | ||
private RetryPolicy retryPolicy; | ||
private ContainerRegistryServiceVersion version; | ||
private String authenticationScope; | ||
|
||
/** | ||
* Sets the service endpoint for the Azure Container Registry instance. | ||
|
@@ -107,6 +104,23 @@ public ContainerRegistryClientBuilder endpoint(String endpoint) { | |
return this; | ||
} | ||
|
||
/** | ||
* Sets the authentication scope to be used for getting AAD credentials. | ||
* | ||
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. nit: |
||
* NOTE - This is a temporary property that is added into the system until the service | ||
* exposes this directly via the challenge based auth scheme. | ||
* If this property is not provided then by default Azure public scope is used for authentication. | ||
* | ||
* Example:- For Azure public cloud this value is same as AzureEnvironment.Azure.managementEndpoint(). | ||
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. Could this link to a static resource with further explanation? Right now, as a user if I'm new to Azure SDKs, or Azure libraries in general, where would I go to understand this further based on this example? #Resolved |
||
* | ||
* @param authenticationScope ARM management scope associated with the given registry. | ||
* @return The updated {@link ContainerRegistryClientBuilder} object. | ||
*/ | ||
public ContainerRegistryClientBuilder authenticationScope(String authenticationScope) { | ||
this.authenticationScope = authenticationScope; | ||
return this; | ||
} | ||
|
||
/** | ||
* Sets the {@link TokenCredential} used to authenticate REST API calls. | ||
* | ||
|
@@ -282,6 +296,7 @@ private HttpPipeline getHttpPipeline() { | |
this.configuration, | ||
this.retryPolicy, | ||
this.credential, | ||
this.authenticationScope, | ||
this.perCallPolicies, | ||
this.perRetryPolicies, | ||
this.httpClient, | ||
|
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.
For the parameter names we generally use
{@code }
, exAs Javadoc will stylize them to be more obvious. #Resolved