azure-docs-sdk-java/docs-ref-autogen/com.azure.identity.AzureDev...

120 строки
14 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.identity.AzureDeveloperCliCredentialBuilder"
fullName: "com.azure.identity.AzureDeveloperCliCredentialBuilder"
name: "AzureDeveloperCliCredentialBuilder"
nameWithType: "AzureDeveloperCliCredentialBuilder"
summary: "Fluent credential builder for instantiating a <xref uid=\"com.azure.identity.AzureDeveloperCliCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureDeveloperCliCredential\"></xref>."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "<xref href=\"com.azure.identity.CredentialBuilderBase?alt=com.azure.identity.CredentialBuilderBase&text=CredentialBuilderBase\" data-throw-if-not-resolved=\"False\" />"
methodsRef:
- "<xref href=\"com.azure.identity.CredentialBuilderBase.addPolicy(com.azure.core.http.policy.HttpPipelinePolicy)?alt=com.azure.identity.CredentialBuilderBase.addPolicy&text=addPolicy\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.clientOptions(com.azure.core.util.ClientOptions)?alt=com.azure.identity.CredentialBuilderBase.clientOptions&text=clientOptions\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.configuration(com.azure.core.util.Configuration)?alt=com.azure.identity.CredentialBuilderBase.configuration&text=configuration\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.enableAccountIdentifierLogging()?alt=com.azure.identity.CredentialBuilderBase.enableAccountIdentifierLogging&text=enableAccountIdentifierLogging\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.httpClient(com.azure.core.http.HttpClient)?alt=com.azure.identity.CredentialBuilderBase.httpClient&text=httpClient\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.httpLogOptions(com.azure.core.http.policy.HttpLogOptions)?alt=com.azure.identity.CredentialBuilderBase.httpLogOptions&text=httpLogOptions\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.httpPipeline(com.azure.core.http.HttpPipeline)?alt=com.azure.identity.CredentialBuilderBase.httpPipeline&text=httpPipeline\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.maxRetry(int)?alt=com.azure.identity.CredentialBuilderBase.maxRetry&text=maxRetry\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.pipeline(com.azure.core.http.HttpPipeline)?alt=com.azure.identity.CredentialBuilderBase.pipeline&text=pipeline\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.proxyOptions(com.azure.core.http.ProxyOptions)?alt=com.azure.identity.CredentialBuilderBase.proxyOptions&text=proxyOptions\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.retryOptions(com.azure.core.http.policy.RetryOptions)?alt=com.azure.identity.CredentialBuilderBase.retryOptions&text=retryOptions\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.retryPolicy(com.azure.core.http.policy.RetryPolicy)?alt=com.azure.identity.CredentialBuilderBase.retryPolicy&text=retryPolicy\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.identity.CredentialBuilderBase.retryTimeout(java.util.function.Function<java.time.Duration,java.time.Duration>)?alt=com.azure.identity.CredentialBuilderBase.retryTimeout&text=retryTimeout\" data-throw-if-not-resolved=\"False\" />"
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **AzureDeveloperCliCredentialBuilder**</br> extends <xref href=\"com.azure.identity.CredentialBuilderBase?alt=com.azure.identity.CredentialBuilderBase&text=CredentialBuilderBase\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.identity.AzureDeveloperCliCredentialBuilder?alt=com.azure.identity.AzureDeveloperCliCredentialBuilder&text=AzureDeveloperCliCredentialBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
constructors:
- uid: "com.azure.identity.AzureDeveloperCliCredentialBuilder.AzureDeveloperCliCredentialBuilder()"
fullName: "com.azure.identity.AzureDeveloperCliCredentialBuilder.AzureDeveloperCliCredentialBuilder()"
name: "AzureDeveloperCliCredentialBuilder()"
nameWithType: "AzureDeveloperCliCredentialBuilder.AzureDeveloperCliCredentialBuilder()"
summary: "Constructs an instance of Azure<wbr>Developer<wbr>Cli<wbr>Credential<wbr>Builder."
syntax: "public AzureDeveloperCliCredentialBuilder()"
desc: "Constructs an instance of AzureDeveloperCliCredentialBuilder."
methods:
- uid: "com.azure.identity.AzureDeveloperCliCredentialBuilder.additionallyAllowedTenants(java.lang.String...)"
fullName: "com.azure.identity.AzureDeveloperCliCredentialBuilder.additionallyAllowedTenants(String[] additionallyAllowedTenants)"
name: "additionallyAllowedTenants(String[] additionallyAllowedTenants)"
nameWithType: "AzureDeveloperCliCredentialBuilder.additionallyAllowedTenants(String[] additionallyAllowedTenants)"
summary: "Specifies tenants in addition to the specified tenant<wbr>Id for which the credential may acquire tokens."
parameters:
- description: "the additionally allowed tenants."
name: "additionallyAllowedTenants"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>[]"
syntax: "public AzureDeveloperCliCredentialBuilder additionallyAllowedTenants(String[] additionallyAllowedTenants)"
desc: "Specifies tenants in addition to the specified tenantId for which the credential may acquire tokens. Add the wildcard value \"\\*\" to allow the credential to acquire tokens for any tenant the logged in account can access. If no value is specified for tenantId this option will have no effect, and the credential will acquire tokens for any requested tenant."
returns:
description: "An updated instance of this builder with the additional tenants configured."
type: "<xref href=\"com.azure.identity.AzureDeveloperCliCredentialBuilder?alt=com.azure.identity.AzureDeveloperCliCredentialBuilder&text=AzureDeveloperCliCredentialBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.identity.AzureDeveloperCliCredentialBuilder.additionallyAllowedTenants(java.util.List<java.lang.String>)"
fullName: "com.azure.identity.AzureDeveloperCliCredentialBuilder.additionallyAllowedTenants(List<String> additionallyAllowedTenants)"
name: "additionallyAllowedTenants(List<String> additionallyAllowedTenants)"
nameWithType: "AzureDeveloperCliCredentialBuilder.additionallyAllowedTenants(List<String> additionallyAllowedTenants)"
summary: "Specifies tenants in addition to the specified tenant<wbr>Id for which the credential may acquire tokens."
parameters:
- description: "the additionally allowed tenants."
name: "additionallyAllowedTenants"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
syntax: "public AzureDeveloperCliCredentialBuilder additionallyAllowedTenants(List<String> additionallyAllowedTenants)"
desc: "Specifies tenants in addition to the specified tenantId for which the credential may acquire tokens. Add the wildcard value \"\\*\" to allow the credential to acquire tokens for any tenant the logged in account can access. If no value is specified for tenantId this option will have no effect, and the credential will acquire tokens for any requested tenant."
returns:
description: "An updated instance of this builder with the additional tenants configured."
type: "<xref href=\"com.azure.identity.AzureDeveloperCliCredentialBuilder?alt=com.azure.identity.AzureDeveloperCliCredentialBuilder&text=AzureDeveloperCliCredentialBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.identity.AzureDeveloperCliCredentialBuilder.build()"
fullName: "com.azure.identity.AzureDeveloperCliCredentialBuilder.build()"
name: "build()"
nameWithType: "AzureDeveloperCliCredentialBuilder.build()"
summary: "Creates a new <xref uid=\"com.azure.identity.AzureDeveloperCliCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureDeveloperCliCredential\"></xref> with the current configurations."
syntax: "public AzureDeveloperCliCredential build()"
desc: "Creates a new <xref uid=\"com.azure.identity.AzureDeveloperCliCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureDeveloperCliCredential\"></xref> with the current configurations."
returns:
description: "a <xref uid=\"com.azure.identity.AzureDeveloperCliCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureDeveloperCliCredential\"></xref> with the current configurations."
type: "<xref href=\"com.azure.identity.AzureDeveloperCliCredential?alt=com.azure.identity.AzureDeveloperCliCredential&text=AzureDeveloperCliCredential\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.identity.AzureDeveloperCliCredentialBuilder.processTimeout(java.time.Duration)"
fullName: "com.azure.identity.AzureDeveloperCliCredentialBuilder.processTimeout(Duration processTimeout)"
name: "processTimeout(Duration processTimeout)"
nameWithType: "AzureDeveloperCliCredentialBuilder.processTimeout(Duration processTimeout)"
summary: "Specifies a <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref> timeout for calling the Azure Developer CLI."
parameters:
- description: "The <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref> to wait."
name: "processTimeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public AzureDeveloperCliCredentialBuilder processTimeout(Duration processTimeout)"
desc: "Specifies a <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref> timeout for calling the Azure Developer CLI. The timeout period is applied on the Azure Developer CLI command execution process invoked by the credential."
returns:
description: "An updated instance of this builder with the timeout specified."
type: "<xref href=\"com.azure.identity.AzureDeveloperCliCredentialBuilder?alt=com.azure.identity.AzureDeveloperCliCredentialBuilder&text=AzureDeveloperCliCredentialBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.identity.AzureDeveloperCliCredentialBuilder.tenantId(java.lang.String)"
fullName: "com.azure.identity.AzureDeveloperCliCredentialBuilder.tenantId(String tenantId)"
name: "tenantId(String tenantId)"
nameWithType: "AzureDeveloperCliCredentialBuilder.tenantId(String tenantId)"
summary: "Sets the tenant ID of the application."
parameters:
- description: "the tenant ID of the application."
name: "tenantId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public AzureDeveloperCliCredentialBuilder tenantId(String tenantId)"
desc: "Sets the tenant ID of the application."
returns:
description: "An updated instance of this builder with the tenant id set as specified."
type: "<xref href=\"com.azure.identity.AzureDeveloperCliCredentialBuilder?alt=com.azure.identity.AzureDeveloperCliCredentialBuilder&text=AzureDeveloperCliCredentialBuilder\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Fluent credential builder for instantiating a <xref uid=\"com.azure.identity.AzureDeveloperCliCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureDeveloperCliCredential\"></xref>.\n\nAzure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific to Azure developers. It allows users to authenticate as a user and/or a service principal against [Microsoft Entra ID][]. The AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of the logged-in user or service principal in Azure Developer CLI. It acts as the Azure Developer CLI logged in user or service principal and executes an Azure CLI command underneath to authenticate the application against Microsoft Entra ID.\n\n**Sample: Construct AzureDeveloperCliCredential**\n\nThe following code sample demonstrates the creation of a <xref uid=\"com.azure.identity.AzureDeveloperCliCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.identity.AzureDeveloperCliCredential\"></xref>, using the <xref uid=\"com.azure.identity.AzureDeveloperCliCredentialBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.identity.AzureDeveloperCliCredentialBuilder\"></xref> to configure it. Once this credential is created, it may be passed into the builder of many of the Azure SDK for Java client builders as the 'credential' parameter.\n\n```java\nTokenCredential azureDevCliCredential = new AzureDeveloperCliCredentialBuilder().build();\n```\n\n\n[Microsoft Entra ID]: https://learn.microsoft.com/entra/fundamentals/"
metadata: {}
package: "com.azure.identity"
artifact: com.azure:azure-identity:1.14.1