Interface Azure.Authenticated

All Superinterfaces:
AccessManagement
Enclosing class:
Azure

public static interface Azure.Authenticated extends AccessManagement
Provides authenticated access to a subset of Azure APIs that do not require a specific subscription.

To access the subscription-specific APIs, use withSubscription(String), or withDefaultSubscription() if a default subscription has already been previously specified (for example, in a previously specified authentication file).

  • Method Details

    • tenantId

      String tenantId()
      Returns:
      the currently selected tenant ID this client is authenticated to work with
    • subscriptions

      Subscriptions subscriptions()
      Entry point to subscription management APIs.
      Returns:
      Subscriptions interface providing access to subscription management
    • tenants

      Tenants tenants()
      Entry point to tenant management APIs.
      Returns:
      Tenants interface providing access to tenant management
    • withSubscription

      Azure withSubscription(String subscriptionId)
      Selects a specific subscription for the APIs to work with.

      Most Azure APIs require a specific subscription to be selected.

      Parameters:
      subscriptionId - the ID of the subscription
      Returns:
      an authenticated Azure client configured to work with the specified subscription
    • withDefaultSubscription

      Azure withDefaultSubscription() throws com.microsoft.azure.CloudException, IOException
      Selects the default subscription as the subscription for the APIs to work with.

      The default subscription can be specified inside the authentication file using Azure.authenticate(File). If no default subscription has been previously provided, the first subscription as returned by subscriptions() will be selected.

      Returns:
      an authenticated Azure client configured to work with the default subscription
      Throws:
      com.microsoft.azure.CloudException - exception thrown from Azure
      IOException - exception thrown from serialization/deserialization