Share via


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)

Note: Only use this constructor for custom Azure cloud/endpoints.

AzureProfile(AzureCloud azureCloud)

Creates AzureProfile instance with specific Azure cloud.

AzureProfile(String tenantId, String subscriptionId, AzureEnvironment environment)

Note: Only use this constructor for custom Azure cloud/endpoints.

AzureProfile(String tenantId, String subscriptionId, AzureCloud azureCloud)

Creates AzureProfile instance with tenant ID, subscription ID and specific Azure cloud.

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)

Note: Only use this constructor for custom Azure cloud/endpoints. Use AzureProfile(String tenantId, String subscriptionId, AzureCloud azureCloud) for global 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(AzureCloud azureCloud)

Creates AzureProfile instance with specific Azure cloud. The global cloud is AZURE_PUBLIC_CLOUD. 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:

azureCloud - the Azure cloud

AzureProfile

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

Note: Only use this constructor for custom Azure cloud/endpoints. Use AzureProfile(String tenantId, String subscriptionId, AzureCloud azureCloud) for global 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

AzureProfile

public AzureProfile(String tenantId, String subscriptionId, AzureCloud azureCloud)

Creates AzureProfile instance with tenant ID, subscription ID and specific Azure cloud. The global cloud is AZURE_PUBLIC_CLOUD.

Parameters:

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

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