AzureProfile Class

  • java.lang.Object
    • com.azure.core.management.profile.AzureProfile

public final class AzureProfile

Azure profile for client.

Constructor Summary

Constructor Description
AzureProfile(AzureEnvironment environment)

Creates AzureProfile instance with Azure environment.

AzureProfile(String tenantId, String subscriptionId, AzureEnvironment environment)

Creates AzureProfile instance with tenant ID, subscription ID and Azure environment.

Method Summary

Modifier and Type Method and Description
AzureEnvironment getEnvironment()

Gets Azure environment.

String getSubscriptionId()

Gets subscription ID.

String getTenantId()

Gets tenant ID.

Methods inherited from java.lang.Object

Constructor Details

AzureProfile

public AzureProfile(AzureEnvironment environment)

Creates AzureProfile instance with Azure environment. The global environment is AZURE. The tenant ID and subscription ID can be set via environment variables. The environment variables are expected as below:

  • AZURE_TENANT_ID
  • AZURE_SUBSCRIPTION_ID

Parameters:

environment - the Azure environment

AzureProfile

public AzureProfile(String tenantId, String subscriptionId, AzureEnvironment environment)

Creates AzureProfile instance with tenant ID, subscription ID and Azure environment. The global environment is AZURE.

Parameters:

tenantId - the tenant ID required for Graph Rbac
subscriptionId - the subscription ID required for resource management
environment - the Azure environment

Method Details

getEnvironment

public AzureEnvironment getEnvironment()

Gets Azure environment.

Returns:

the Azure environment

getSubscriptionId

public String getSubscriptionId()

Gets subscription ID.

Returns:

the subscription ID

getTenantId

public String getTenantId()

Gets tenant ID.

Returns:

the tenant ID

Applies to