azure.mgmt.subscription.operations module

class azure.mgmt.subscription.operations.SubscriptionsOperations(client, config, serializer, deserializer)[source]

Bases: object

SubscriptionsOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – The API version to use for the operation. Constant value: “2016-06-01”.

get(subscription_id, custom_headers=None, raw=False, **operation_config)[source]

Gets details about a specified subscription.

Parameters
  • subscription_id (str) – The ID of the target subscription.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

Subscription or ClientRawResponse if raw=true

Return type

Subscription or ClientRawResponse

Raises

CloudError

list(custom_headers=None, raw=False, **operation_config)[source]

Gets all subscriptions for a tenant.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Subscription

Return type

SubscriptionPaged[Subscription]

Raises

CloudError

list_locations(subscription_id, custom_headers=None, raw=False, **operation_config)[source]

Gets all available geo-locations.

This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.

Parameters
  • subscription_id (str) – The ID of the target subscription.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Location

Return type

LocationPaged[Location]

Raises

CloudError

models = <module 'azure.mgmt.subscription.models' from '/home/vsts/work/1/s/sdk/subscription/azure-mgmt-subscription/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/subscription/models/__init__.py'>
class azure.mgmt.subscription.operations.TenantsOperations(client, config, serializer, deserializer)[source]

Bases: object

TenantsOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – The API version to use for the operation. Constant value: “2016-06-01”.

list(custom_headers=None, raw=False, **operation_config)[source]

Gets the tenants for your account.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of TenantIdDescription

Return type

TenantIdDescriptionPaged[TenantIdDescription]

Raises

CloudError

models = <module 'azure.mgmt.subscription.models' from '/home/vsts/work/1/s/sdk/subscription/azure-mgmt-subscription/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/subscription/models/__init__.py'>
class azure.mgmt.subscription.operations.SubscriptionOperations(client, config, serializer, deserializer)[source]

Bases: object

SubscriptionOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. Current version is 2019-10-01-preview. Constant value: “2019-10-01-preview”.

cancel(subscription_id, custom_headers=None, raw=False, **operation_config)[source]

The operation to cancel a subscription.

Parameters
  • subscription_id (str) – Subscription Id.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

CanceledSubscriptionId or ClientRawResponse if raw=true

Return type

CanceledSubscriptionId or ClientRawResponse

Raises

ErrorResponseException

create_csp_subscription(billing_account_name, customer_name, body, custom_headers=None, raw=False, polling=True, **operation_config)[source]

The operation to create a new CSP subscription.

Parameters
  • billing_account_name (str) – The name of the Microsoft Customer Agreement billing account for which you want to create the subscription.

  • customer_name (str) – The name of the customer.

  • body (ModernCspSubscriptionCreationParameters) – The subscription creation parameters.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns SubscriptionCreationResult or ClientRawResponse<SubscriptionCreationResult> if raw==True

Return type

AzureOperationPoller[SubscriptionCreationResult] or AzureOperationPoller[ClientRawResponse[SubscriptionCreationResult]]

Raises

ErrorResponseException

create_subscription(billing_account_name, billing_profile_name, invoice_section_name, body, custom_headers=None, raw=False, polling=True, **operation_config)[source]

The operation to create a new WebDirect or EA Azure subscription.

Parameters
  • billing_account_name (str) – The name of the Microsoft Customer Agreement billing account for which you want to create the subscription.

  • billing_profile_name (str) – The name of the billing profile in the billing account for which you want to create the subscription.

  • invoice_section_name (str) – The name of the invoice section in the billing account for which you want to create the subscription.

  • body (ModernSubscriptionCreationParameters) – The subscription creation parameters.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns SubscriptionCreationResult or ClientRawResponse<SubscriptionCreationResult> if raw==True

Return type

AzureOperationPoller[SubscriptionCreationResult] or AzureOperationPoller[ClientRawResponse[SubscriptionCreationResult]]

Raises

ErrorResponseException

create_subscription_in_enrollment_account(enrollment_account_name, body, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Creates an Azure subscription.

Parameters
  • enrollment_account_name (str) – The name of the enrollment account to which the subscription will be billed.

  • body (SubscriptionCreationParameters) – The subscription creation parameters.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns SubscriptionCreationResult or ClientRawResponse<SubscriptionCreationResult> if raw==True

Return type

AzureOperationPoller[SubscriptionCreationResult] or AzureOperationPoller[ClientRawResponse[SubscriptionCreationResult]]

Raises

ErrorResponseException

enable(subscription_id, custom_headers=None, raw=False, **operation_config)[source]

The operation to enable a subscription.

Parameters
  • subscription_id (str) – Subscription Id.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

EnabledSubscriptionId or ClientRawResponse if raw=true

Return type

EnabledSubscriptionId or ClientRawResponse

Raises

ErrorResponseException

rename(subscription_id, subscription_name=None, custom_headers=None, raw=False, **operation_config)[source]

The operation to rename a subscription.

Parameters
  • subscription_id (str) – Subscription Id.

  • subscription_name (str) – New subscription name

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

RenamedSubscriptionId or ClientRawResponse if raw=true

Return type

RenamedSubscriptionId or ClientRawResponse

Raises

ErrorResponseException

models = <module 'azure.mgmt.subscription.models' from '/home/vsts/work/1/s/sdk/subscription/azure-mgmt-subscription/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/subscription/models/__init__.py'>
class azure.mgmt.subscription.operations.SubscriptionOperationOperations(client, config, serializer, deserializer)[source]

Bases: object

SubscriptionOperationOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. Current version is 2019-10-01-preview. Constant value: “2019-10-01-preview”.

get(operation_id, custom_headers=None, raw=False, **operation_config)[source]

Get the status of the pending Microsoft.Subscription API operations.

Parameters
  • operation_id (str) – The operation ID, which can be found from the Location field in the generate recommendation response header.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

SubscriptionCreationResult or ClientRawResponse if raw=true

Return type

SubscriptionCreationResult or ClientRawResponse

Raises

CloudError

models = <module 'azure.mgmt.subscription.models' from '/home/vsts/work/1/s/sdk/subscription/azure-mgmt-subscription/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/subscription/models/__init__.py'>
class azure.mgmt.subscription.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. Current version is 2019-10-01-preview. Constant value: “2019-10-01-preview”.

list(custom_headers=None, raw=False, **operation_config)[source]

Lists all of the available Microsoft.Subscription API operations.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

OperationListResult or ClientRawResponse if raw=true

Return type

OperationListResult or ClientRawResponse

Raises

ErrorResponseException

models = <module 'azure.mgmt.subscription.models' from '/home/vsts/work/1/s/sdk/subscription/azure-mgmt-subscription/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/subscription/models/__init__.py'>