azure.mgmt.reservations.operations module

class azure.mgmt.reservations.operations.QuotaOperations(client, config, serializer, deserializer)[source]

Bases: object

QuotaOperations 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 – API version. Constant value: “2019-07-19-preview”.

create_or_update(subscription_id, provider_id, location, resource_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Create or update the service limits (quota) of a resource to requested value. Steps: 1. Make the Get request to get the quota information for specific resource. 2. To increase the quota, update the limit field in the response from Get request to new value. 3. Submit the JSON to the quota request API to update the quota. The Create quota request may be constructed as follows. The PUT operation can be used to update the quota.

Parameters
  • subscription_id (str) – Azure subscription id.

  • provider_id (str) – Azure resource provider id.

  • location (str) – Azure region.

  • resource_name (str) – The resource name for a resource provider, such as SKU name for Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices

  • properties (QuotaProperties) – Quota properties for the resource.

  • 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 object or ClientRawResponse<object> if raw==True

Return type

AzureOperationPoller[object] or AzureOperationPoller[ClientRawResponse[object]]

Raises

ExceptionResponseException

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

Gets the current service limits (quotas) and usage of a resource. The response from Get API can be leveraged to submit quota update requests.

Parameters
  • subscription_id (str) – Azure subscription id.

  • provider_id (str) – Azure resource provider id.

  • location (str) – Azure region.

  • resource_name (str) – The resource name for a resource provider, such as SKU name for Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices

  • 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

CurrentQuotaLimitBase or ClientRawResponse if raw=true

Return type

CurrentQuotaLimitBase or ClientRawResponse

Raises

ExceptionResponseException

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

Get a list of current service limits (quota) and usages of all the resources. The response from List API can be leveraged to submit quota update requests.

Parameters
  • subscription_id (str) – Azure subscription id.

  • provider_id (str) – Azure resource provider id.

  • location (str) – Azure region.

  • 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 CurrentQuotaLimitBase

Return type

CurrentQuotaLimitBasePaged[CurrentQuotaLimitBase]

Raises

ExceptionResponseException

update(subscription_id, provider_id, location, resource_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Update the service limits (quota) of a resource to requested value. Steps: 1. Make the Get request to get the quota information for specific resource. 2. To increase the quota, update the limit field in the response from Get request to new value. 3. Submit the JSON to the quota request API to update the quota. The Update quota request may be constructed as follows. The PATCH operation can be used to update the quota.

Parameters
  • subscription_id (str) – Azure subscription id.

  • provider_id (str) – Azure resource provider id.

  • location (str) – Azure region.

  • resource_name (str) – The resource name for a resource provider, such as SKU name for Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices

  • properties (QuotaProperties) – Quota properties for the resource.

  • 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 object or ClientRawResponse<object> if raw==True

Return type

AzureOperationPoller[object] or AzureOperationPoller[ClientRawResponse[object]]

Raises

ExceptionResponseException

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

Bases: object

QuotaRequestStatusOperations 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 – API version. Constant value: “2019-07-19-preview”.

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

Gets the QuotaRequest details and status by the quota request Id for the resources for the resource provider at a specific location. The requestId is returned as response to the Put requests for serviceLimits.

Parameters
  • subscription_id (str) – Azure subscription id.

  • provider_id (str) – Azure resource provider id.

  • location (str) – Azure region.

  • id (str) – Quota Request 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

QuotaRequestDetails or ClientRawResponse if raw=true

Return type

QuotaRequestDetails or ClientRawResponse

Raises

ExceptionResponseException

list(subscription_id, provider_id, location, filter=None, top=None, skiptoken=None, custom_headers=None, raw=False, **operation_config)[source]

For the specified location and Resource provider gets the current quota requests under the subscription over the time period of one year ago from now to one year back. oData filter can be used to select quota requests.

Parameters
  • subscription_id (str) – Azure subscription id.

  • provider_id (str) – Azure resource provider id.

  • location (str) – Azure region.

  • filter (str) –

    Field | Supported operators

    |---------------------|———————— |requestSubmitTime | ge, le, eq, gt, lt

  • top (int) – Number of records to return.

  • skiptoken (str) – Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls

  • 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 QuotaRequestDetails

Return type

QuotaRequestDetailsPaged[QuotaRequestDetails]

Raises

ExceptionResponseException

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

Bases: object

AutoQuotaIncreaseOperations 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 – API version. Constant value: “2019-07-19-preview”.

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

Sets the Auto Quota Increase enrollment properties for the specified subscription.

Parameters
  • subscription_id (str) – Azure subscription id.

  • auto_quota_increase_request (AutoQuotaIncreaseDetail) – Auto Quota increase request payload.

  • 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

AutoQuotaIncreaseDetail or ClientRawResponse if raw=true

Return type

AutoQuotaIncreaseDetail or ClientRawResponse

Raises

ExceptionResponseException

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

Gets the Auto Quota Increase enrollment details for the specified subscription.

Parameters
  • subscription_id (str) – Azure 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

AutoQuotaIncreaseDetail or ClientRawResponse if raw=true

Return type

AutoQuotaIncreaseDetail or ClientRawResponse

Raises

ExceptionResponseException

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

Bases: object

ReservationOperations 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 – Supported version for this document is 2019-04-01. Constant value: “2019-04-01”.

available_scopes(reservation_order_id, reservation_id, body, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Get Available Scopes for Reservation.

Get Available Scopes for Reservation. .

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • reservation_id (str) – Id of the Reservation Item

  • body (list[str]) –

  • 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 Properties or ClientRawResponse<Properties> if raw==True

Return type

AzureOperationPoller[Properties] or AzureOperationPoller[ClientRawResponse[Properties]]

Raises

ErrorException

get(reservation_id, reservation_order_id, expand=None, custom_headers=None, raw=False, **operation_config)[source]

Get Reservation details.

Get specific Reservation details.

Parameters
  • reservation_id (str) – Id of the Reservation Item

  • reservation_order_id (str) – Order Id of the reservation

  • expand (str) – Supported value of this query is renewProperties

  • 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

ReservationResponse or ClientRawResponse if raw=true

Return type

ReservationResponse or ClientRawResponse

Raises

ErrorException

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

Get `Reservation`s in a given reservation Order.

List Reservation`s within a single `ReservationOrder.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • 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 ReservationResponse

Return type

ReservationResponsePaged[ReservationResponse]

Raises

ErrorException

list_revisions(reservation_id, reservation_order_id, custom_headers=None, raw=False, **operation_config)[source]

Get Reservation revisions.

List of all the revisions for the Reservation.

Parameters
  • reservation_id (str) – Id of the Reservation Item

  • reservation_order_id (str) – Order Id of the reservation

  • 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 ReservationResponse

Return type

ReservationResponsePaged[ReservationResponse]

Raises

ErrorException

merge(reservation_order_id, sources=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Merges two `Reservation`s.

Merge the specified Reservation`s into a new `Reservation. The two `Reservation`s being merged must have same properties.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • sources (list[str]) – Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

  • 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 list or ClientRawResponse<list> if raw==True

Return type

AzureOperationPoller[list[ReservationResponse]] or AzureOperationPoller[ClientRawResponse[list[ReservationResponse]]]

Raises

ErrorException

split(reservation_order_id, quantities=None, reservation_id=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Split the Reservation.

Split a Reservation into two `Reservation`s with specified quantity distribution.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • quantities (list[int]) – List of the quantities in the new reservations to create.

  • reservation_id (str) – Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

  • 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 list or ClientRawResponse<list> if raw==True

Return type

AzureOperationPoller[list[ReservationResponse]] or AzureOperationPoller[ClientRawResponse[list[ReservationResponse]]]

Raises

ErrorException

update(reservation_order_id, reservation_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Updates a Reservation.

Updates the applied scopes of the Reservation.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • reservation_id (str) – Id of the Reservation Item

  • parameters (Patch) – Information needed to patch a reservation item

  • 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 ReservationResponse or ClientRawResponse<ReservationResponse> if raw==True

Return type

AzureOperationPoller[ReservationResponse] or AzureOperationPoller[ClientRawResponse[ReservationResponse]]

Raises

ErrorException

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

Bases: object

ReservationOrderOperations 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 – Supported version for this document is 2019-04-01. Constant value: “2019-04-01”.

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

Calculate price for a ReservationOrder.

Calculate price for placing a ReservationOrder.

Parameters
  • body (PurchaseRequest) – Information needed for calculate or purchase reservation

  • 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

CalculatePriceResponse or ClientRawResponse if raw=true

Return type

CalculatePriceResponse or ClientRawResponse

Raises

ErrorException

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

Get a specific ReservationOrder.

Get the details of the ReservationOrder.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • expand (str) – May be used to expand the planInformation.

  • 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

ReservationOrderResponse or ClientRawResponse if raw=true

Return type

ReservationOrderResponse or ClientRawResponse

Raises

ErrorException

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

Get all `ReservationOrder`s.

List of all the `ReservationOrder`s that the user has access to in the current 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 ReservationOrderResponse

Return type

ReservationOrderResponsePaged[ReservationOrderResponse]

Raises

ErrorException

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

Purchase ReservationOrder.

Purchase ReservationOrder and create resource under the specified URI.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • body (PurchaseRequest) – Information needed for calculate or purchase reservation

  • 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 ReservationOrderResponse or ClientRawResponse<ReservationOrderResponse> if raw==True

Return type

AzureOperationPoller[ReservationOrderResponse] or AzureOperationPoller[ClientRawResponse[ReservationOrderResponse]]

Raises

ErrorException

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

Bases: object

OperationOperations 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 – Supported version for this document is 2019-04-01. Constant value: “2019-04-01”.

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

Get operations.

List all the 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

An iterator like instance of OperationResponse

Return type

OperationResponsePaged[OperationResponse]

Raises

ErrorException

models = <module 'azure.mgmt.reservations.models' from '/home/vsts/work/1/s/sdk/reservations/azure-mgmt-reservations/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/reservations/models/__init__.py'>
class azure.mgmt.reservations.operations.AzureReservationAPIOperationsMixin[source]

Bases: object

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

Get list of applicable `Reservation`s.

Get applicable `Reservation`s that are applied to this subscription or a resource group under this subscription.

Parameters
  • subscription_id (str) – Id of the 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

AppliedReservations or ClientRawResponse if raw=true

Return type

AppliedReservations or ClientRawResponse

Raises

ErrorException

get_catalog(subscription_id, reserved_resource_type, location=None, custom_headers=None, raw=False, **operation_config)[source]

Get the regions and skus that are available for RI purchase for the specified Azure subscription.

Parameters
  • subscription_id (str) – Id of the subscription

  • reserved_resource_type (str) – The type of the resource for which the skus should be provided.

  • location (str) – Filters the skus based on the location specified in this parameter. This can be an azure region or global

  • 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

list or ClientRawResponse if raw=true

Return type

list[Catalog] or ClientRawResponse

Raises

ErrorException