Azure.Authenticated Interface

public interface 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 subscriptionId), or withDefaultSubscription() if a default subscription has already been previously specified (for example, in a previously specified authentication file).

Method Summary

Modifier and Type Method and Description
Subscriptions subscriptions()

Entry point to subscription management APIs.

String tenantId()
Tenants tenants()

Entry point to tenant management APIs.

Azure withDefaultSubscription()

Selects the default subscription as the subscription for the APIs to work with.

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

Azure withSubscription(String subscriptionId)

Selects a specific subscription for the APIs to work with.

Most Azure APIs require a specific subscription to be selected.

Inherited Members

Method Details

subscriptions

public Subscriptions subscriptions()

Entry point to subscription management APIs.

Returns:

Subscriptions interface providing access to subscription management

tenantId

public String tenantId()

Returns:

the currently selected tenant ID this client is authenticated to work with

tenants

public Tenants tenants()

Entry point to tenant management APIs.

Returns:

Tenants interface providing access to tenant management

withDefaultSubscription

public Azure withDefaultSubscription()

Selects the default subscription as the subscription for the APIs to work with.

The default subscription can be specified inside the authentication file using authenticate(File credentialsFile). 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:

CloudException - exception thrown from Azure
IOException - exception thrown from serialization/deserialization

withSubscription

public 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

Applies to