Package com.azure.resourcemanager
Interface AzureResourceManager.Authenticated
-
- All Superinterfaces:
AccessManagement
- Enclosing class:
- AzureResourceManager
public static interface AzureResourceManager.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Subscriptionssubscriptions()Entry point to subscription management APIs.StringtenantId()Tenantstenants()Entry point to tenant management APIs.AzureResourceManagerwithDefaultSubscription()Selects the default subscription as the subscription for the APIs to work with.AzureResourceManagerwithSubscription(String subscriptionId)Selects a specific subscription for the APIs to work with.AzureResourceManager.AuthenticatedwithTenantId(String tenantId)Specifies a specific tenant for azure.-
Methods inherited from interface com.azure.resourcemanager.AccessManagement
activeDirectoryApplications, activeDirectoryGroups, activeDirectoryUsers, roleAssignments, roleDefinitions, servicePrincipals
-
-
-
-
Method Detail
-
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
-
withTenantId
AzureResourceManager.Authenticated withTenantId(String tenantId)
Specifies a specific tenant for azure.Only Graph RBAC APIs require a tenant to be selected.
- Parameters:
tenantId- the ID of the tenant- Returns:
- the authenticated itself for chaining
-
withSubscription
AzureResourceManager 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
AzureResourceManager withDefaultSubscription()
Selects the default subscription as the subscription for the APIs to work with.The default subscription can be specified inside the Azure profile using
AzureProfile. If no default subscription provided, we will try to set the only subscription if applicable returned bysubscriptions()- Returns:
- an authenticated Azure client configured to work with the default subscription
- Throws:
IllegalStateException- when no subscription or more than one subscription found in the tenant.
-
-