azure.mgmt.reservations.operations module¶
-
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 2020-10-01-preview. Constant value: “2020-10-01-preview”.
-
available_scopes
(reservation_order_id, reservation_id, properties=None, 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
properties (AvailableScopeRequestProperties) –
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 AvailableScopeProperties or ClientRawResponse<AvailableScopeProperties> if raw==True
- Return type
AzureOperationPoller[AvailableScopeProperties] or AzureOperationPoller[ClientRawResponse[AvailableScopeProperties]]
- Raises
-
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_config – Operation configuration overrides.
- Returns
ReservationResponse or ClientRawResponse if raw=true
- Return type
ReservationResponse or ClientRawResponse
- Raises
-
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
- Returns
An iterator like instance of ReservationResponse
- Return type
- Raises
-
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_config – Operation configuration overrides.
- Returns
An iterator like instance of ReservationResponse
- Return type
- Raises
-
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
-
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
-
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
-
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 2020-10-01-preview. Constant value: “2020-10-01-preview”.
-
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_config – Operation configuration overrides.
- Returns
CalculatePriceResponse or ClientRawResponse if raw=true
- Return type
CalculatePriceResponse or ClientRawResponse
- Raises
-
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_config – Operation configuration overrides.
- Returns
ReservationOrderResponse or ClientRawResponse if raw=true
- Return type
ReservationOrderResponse or ClientRawResponse
- Raises
-
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
- Returns
An iterator like instance of ReservationOrderResponse
- Return type
- Raises
-
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
-
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 2020-10-01-preview. Constant value: “2020-10-01-preview”.
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Get operations.
List all the operations.
- Parameters
- Returns
An iterator like instance of OperationResponse
- Return type
- Raises
-
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.
CalculateExchangeOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
CalculateExchangeOperations 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 2020-10-01-preview. Constant value: “2020-10-01-preview”.
-
post
(properties=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]¶ Calculates the refund amounts and price of the new purchases.
Calculates price for exchanging Reservations if there are no policy errors. .
- Parameters
properties (CalculateExchangeRequestProperties) –
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 CalculateExchangeOperationResultResponse or ClientRawResponse<CalculateExchangeOperationResultResponse> if raw==True
- Return type
AzureOperationPoller[CalculateExchangeOperationResultResponse] or AzureOperationPoller[ClientRawResponse[CalculateExchangeOperationResultResponse]]
- Raises
-
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.
ExchangeOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ExchangeOperations 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 2020-10-01-preview. Constant value: “2020-10-01-preview”.
-
post
(properties=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]¶ Exchange Reservation(s).
Returns one or more Reservations in exchange for one or more Reservation purchases. .
- Parameters
properties (ExchangeRequestProperties) –
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 ExchangeOperationResultResponse or ClientRawResponse<ExchangeOperationResultResponse> if raw==True
- Return type
AzureOperationPoller[ExchangeOperationResultResponse] or AzureOperationPoller[ClientRawResponse[ExchangeOperationResultResponse]]
- Raises
-
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.
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: “2020-10-25”.
-
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 quota (service limits) of a resource to the 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
-
get
(subscription_id, provider_id, location, resource_name, custom_headers=None, raw=False, **operation_config)[source]¶ Get the current quota (service limit) and usage of a resource. You can use the response from the GET operation to submit quota update request.
- 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_config – Operation configuration overrides.
- Returns
CurrentQuotaLimitBase or ClientRawResponse if raw=true
- Return type
CurrentQuotaLimitBase or ClientRawResponse
- Raises
-
list
(subscription_id, provider_id, location, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a list of current quotas (service limits) and usage for all resources. The response from the list quota operation can be leveraged to request quota updates.
- 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_config – Operation configuration overrides.
- Returns
An iterator like instance of CurrentQuotaLimitBase
- Return type
- Raises
-
update
(subscription_id, provider_id, location, resource_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]¶ Update the quota (service limits) of this resource to the requested value. • To get the quota information for specific resource, send a GET request. • To increase the quota, update the limit field from the GET response to a new value. • To update the quota value, submit the JSON response to the quota request API to update the quota. • To update the quota. use the PATCH operation.
- 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
-
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: “2020-10-25”.
-
get
(subscription_id, provider_id, location, id, custom_headers=None, raw=False, **operation_config)[source]¶ For the specified Azure region (location), get the details and status of the quota request by the quota request ID for the resources of the resource provider. The PUT request for the quota (service limit) returns a response with the requestId parameter.
- 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_config – Operation configuration overrides.
- Returns
QuotaRequestDetails or ClientRawResponse if raw=true
- Return type
QuotaRequestDetails or ClientRawResponse
- Raises
-
list
(subscription_id, provider_id, location, filter=None, top=None, skiptoken=None, custom_headers=None, raw=False, **operation_config)[source]¶ For the specified Azure region (location), subscription, and resource provider, get the history of the quota requests for the past year. To select specific quota requests, use the oData filter.
- 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 includes 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_config – Operation configuration overrides.
- Returns
An iterator like instance of QuotaRequestDetails
- Return type
- Raises
-
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
- Returns
AppliedReservations or ClientRawResponse if raw=true
- Return type
AppliedReservations or ClientRawResponse
- Raises
-
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_config – Operation configuration overrides.
- Returns
list or ClientRawResponse if raw=true
- Return type
- Raises
-