azure.mgmt.subscription.models module

exception azure.mgmt.subscription.models.ErrorResponseException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘ErrorResponse’.

Parameters
  • deserialize – A deserializer

  • response – Server response to be deserialized.

class azure.mgmt.subscription.models.AdPrincipal(*, object_id: str, **kwargs)[source]

Bases: msrest.serialization.Model

Active Directory Principal who’ll get owner access on the new subscription.

All required parameters must be populated in order to send to Azure.

Parameters

object_id (str) – Required. Object id of the Principal

class azure.mgmt.subscription.models.CanceledSubscriptionId(**kwargs)[source]

Bases: msrest.serialization.Model

The ID of the canceled subscription.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

value (str) – The ID of the canceled subscription

class azure.mgmt.subscription.models.EnabledSubscriptionId(**kwargs)[source]

Bases: msrest.serialization.Model

The ID of the subscriptions that is being enabled.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

value (str) – The ID of the subscriptions that is being enabled

class azure.mgmt.subscription.models.ErrorResponse(*, code: str = None, message: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Describes the format of Error response.

Parameters
  • code (str) – Error code

  • message (str) – Error message indicating why the operation failed.

class azure.mgmt.subscription.models.Location(**kwargs)[source]

Bases: msrest.serialization.Model

Location information.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.

  • subscription_id (str) – The subscription ID.

  • name (str) – The location name.

  • display_name (str) – The display name of the location.

  • latitude (str) – The latitude of the location.

  • longitude (str) – The longitude of the location.

class azure.mgmt.subscription.models.ModernCspSubscriptionCreationParameters(*, display_name: str, sku_id: str, reseller_id: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

The parameters required to create a new CSP subscription.

All required parameters must be populated in order to send to Azure.

Parameters
  • display_name (str) – Required. The friendly name of the subscription.

  • sku_id (str) – Required. The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest.

  • reseller_id (str) – Reseller ID, basically MPN Id.

class azure.mgmt.subscription.models.ModernSubscriptionCreationParameters(*, display_name: str, sku_id: str, cost_center: str = None, owner=None, management_group_id: str = None, additional_parameters=None, **kwargs)[source]

Bases: msrest.serialization.Model

The parameters required to create a new subscription.

All required parameters must be populated in order to send to Azure.

Parameters
  • display_name (str) – Required. The friendly name of the subscription.

  • sku_id (str) – Required. The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest.

  • cost_center (str) – If set, the cost center will show up on the Azure usage and charges file.

  • owner (AdPrincipal) – If specified, the AD principal will get owner access to the subscription, along with the user who is performing the create subscription operation

  • management_group_id (str) – The identifier of the management group to which this subscription will be associated.

  • additional_parameters (dict[str, object]) – Additional, untyped parameters to support custom subscription creation scenarios.

class azure.mgmt.subscription.models.Operation(*, name: str = None, display=None, **kwargs)[source]

Bases: msrest.serialization.Model

REST API operation.

Parameters
  • name (str) – Operation name: {provider}/{resource}/{operation}

  • display (OperationDisplay) – The object that represents the operation.

class azure.mgmt.subscription.models.OperationDisplay(*, provider: str = None, resource: str = None, operation: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

The object that represents the operation.

Parameters
  • provider (str) – Service provider: Microsoft.Subscription

  • resource (str) – Resource on which the operation is performed: Profile, endpoint, etc.

  • operation (str) – Operation type: Read, write, delete, etc.

class azure.mgmt.subscription.models.OperationListResult(*, value=None, next_link: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Result of the request to list operations. It contains a list of operations and a URL link to get the next set of results.

Parameters
  • value (list[Operation]) – List of operations.

  • next_link (str) – URL to get the next set of operation list results if there are any.

class azure.mgmt.subscription.models.RenamedSubscriptionId(**kwargs)[source]

Bases: msrest.serialization.Model

The ID of the subscriptions that is being renamed.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

value (str) – The ID of the subscriptions that is being renamed

class azure.mgmt.subscription.models.Subscription(*, subscription_policies=None, authorization_source: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Subscription information.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000.

  • subscription_id (str) – The subscription ID.

  • display_name (str) – The subscription display name.

  • state (str or SubscriptionState) – The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Possible values include: ‘Enabled’, ‘Warned’, ‘PastDue’, ‘Disabled’, ‘Deleted’

Parameters
  • subscription_policies (SubscriptionPolicies) – The subscription policies.

  • authorization_source (str) – The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, ‘Legacy, RoleBased’.

class azure.mgmt.subscription.models.SubscriptionCreationParameters(*, display_name: str = None, management_group_id: str = None, owners=None, offer_type=None, additional_parameters=None, **kwargs)[source]

Bases: msrest.serialization.Model

Subscription Creation Parameters required to create a new Azure subscription.

Parameters
  • display_name (str) – The display name of the subscription.

  • management_group_id (str) – The Management Group Id.

  • owners (list[AdPrincipal]) – The list of principals that should be granted Owner access on the subscription. Principals should be of type User, Service Principal or Security Group.

  • offer_type (str or OfferType) – The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available. Only valid when creating a subscription in a enrollment account scope. Possible values include: ‘MS-AZR-0017P’, ‘MS-AZR-0148P’

  • additional_parameters (dict[str, object]) – Additional, untyped parameters to support custom subscription creation scenarios.

class azure.mgmt.subscription.models.SubscriptionCreationResult(*, subscription_link: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

The created subscription object.

Parameters

subscription_link (str) – The link to the new subscription. Use this link to check the status of subscription creation operation.

class azure.mgmt.subscription.models.SubscriptionName(*, subscription_name: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

The new name of the subscription.

Parameters

subscription_name (str) – New subscription name

class azure.mgmt.subscription.models.SubscriptionPolicies(**kwargs)[source]

Bases: msrest.serialization.Model

Subscription policies.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • location_placement_id (str) – The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions.

  • quota_id (str) – The subscription quota ID.

  • spending_limit (str or SpendingLimit) – The subscription spending limit. Possible values include: ‘On’, ‘Off’, ‘CurrentPeriodOff’

class azure.mgmt.subscription.models.TenantIdDescription(**kwargs)[source]

Bases: msrest.serialization.Model

Tenant Id information.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000.

  • tenant_id (str) – The tenant ID. For example, 00000000-0000-0000-0000-000000000000.

class azure.mgmt.subscription.models.LocationPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Location object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.subscription.models.SubscriptionPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Subscription object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.subscription.models.TenantIdDescriptionPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of TenantIdDescription object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.subscription.models.SubscriptionState[source]

Bases: str, enum.Enum

An enumeration.

deleted = 'Deleted'
disabled = 'Disabled'
enabled = 'Enabled'
past_due = 'PastDue'
warned = 'Warned'
class azure.mgmt.subscription.models.SpendingLimit[source]

Bases: str, enum.Enum

An enumeration.

current_period_off = 'CurrentPeriodOff'
off = 'Off'
on = 'On'
class azure.mgmt.subscription.models.OfferType[source]

Bases: str, enum.Enum

An enumeration.

ms_azr_0017_p = 'MS-AZR-0017P'
ms_azr_0148_p = 'MS-AZR-0148P'