Partilhar via


Subscription Interface

Implements

public interface Subscription
extends Indexable, HasInnerModel<SubscriptionInner>

An immutable client-side representation of an Azure subscription.

Method Summary

Modifier and Type Method and Description
abstract String displayName()
abstract Location getLocationByRegion(Region region)

Gets the data center location for the specified region, if the selected subscription has access to it.

abstract PagedIterable<Location> listLocations()

List the locations the subscription has access to.

abstract SubscriptionState state()
abstract String subscriptionId()
abstract SubscriptionPolicies subscriptionPolicies()

Method Details

displayName

public abstract String displayName()

Returns:

the name of the subscription for humans to read

getLocationByRegion

public abstract Location getLocationByRegion(Region region)

Gets the data center location for the specified region, if the selected subscription has access to it.

Parameters:

region - an Azure region

Returns:

an Azure data center location, or null if the location is not accessible to this subscription

listLocations

public abstract PagedIterable listLocations()

List the locations the subscription has access to.

Returns:

the lazy list of locations

state

public abstract SubscriptionState state()

Returns:

the state of the subscription.

subscriptionId

public abstract String subscriptionId()

Returns:

the UUID of the subscription

subscriptionPolicies

public abstract SubscriptionPolicies subscriptionPolicies()

Returns:

the policies defined in the subscription

Applies to