Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/reservations/azure-mgmt-reservations/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Reservations Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationResponse
from ._models_py3 import Patch
from ._models_py3 import PatchPropertiesRenewProperties
from ._models_py3 import PurchaseRequest
from ._models_py3 import PurchaseRequestPropertiesReservedResourceProperties
from ._models_py3 import RenewPropertiesResponse
from ._models_py3 import RenewPropertiesResponseLockedPriceTotal
from ._models_py3 import ReservationMergeProperties
from ._models_py3 import ReservationOrderResponse
from ._models_py3 import ReservationProperties
Expand All @@ -50,8 +53,11 @@
from ._models import OperationDisplay
from ._models import OperationResponse
from ._models import Patch
from ._models import PatchPropertiesRenewProperties
from ._models import PurchaseRequest
from ._models import PurchaseRequestPropertiesReservedResourceProperties
from ._models import RenewPropertiesResponse
from ._models import RenewPropertiesResponseLockedPriceTotal
from ._models import ReservationMergeProperties
from ._models import ReservationOrderResponse
from ._models import ReservationProperties
Expand Down Expand Up @@ -88,8 +94,11 @@
'OperationDisplay',
'OperationResponse',
'Patch',
'PatchPropertiesRenewProperties',
'PurchaseRequest',
'PurchaseRequestPropertiesReservedResourceProperties',
'RenewPropertiesResponse',
'RenewPropertiesResponseLockedPriceTotal',
'ReservationMergeProperties',
'ReservationOrderResponse',
'ReservationProperties',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,20 @@ class Patch(Model):
~azure.mgmt.reservations.models.InstanceFlexibility
:param name: Name of the Reservation
:type name: str
:param renew:
:type renew: bool
:param renew_properties:
:type renew_properties:
~azure.mgmt.reservations.models.PatchPropertiesRenewProperties
"""

_attribute_map = {
'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'},
'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'},
'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'},
'name': {'key': 'properties.name', 'type': 'str'},
'renew': {'key': 'properties.renew', 'type': 'bool'},
'renew_properties': {'key': 'properties.renewProperties', 'type': 'PatchPropertiesRenewProperties'},
}

def __init__(self, **kwargs):
Expand All @@ -424,6 +431,24 @@ def __init__(self, **kwargs):
self.applied_scopes = kwargs.get('applied_scopes', None)
self.instance_flexibility = kwargs.get('instance_flexibility', None)
self.name = kwargs.get('name', None)
self.renew = kwargs.get('renew', None)
self.renew_properties = kwargs.get('renew_properties', None)


class PatchPropertiesRenewProperties(Model):
"""PatchPropertiesRenewProperties.

:param purchase_properties:
:type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest
"""

_attribute_map = {
'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'},
}

def __init__(self, **kwargs):
super(PatchPropertiesRenewProperties, self).__init__(**kwargs)
self.purchase_properties = kwargs.get('purchase_properties', None)


class PurchaseRequest(Model):
Expand All @@ -450,6 +475,8 @@ class PurchaseRequest(Model):
~azure.mgmt.reservations.models.AppliedScopeType
:param applied_scopes:
:type applied_scopes: list[str]
:param renew:
:type renew: bool
:param reserved_resource_properties: Properties specific to each reserved
resource type. Not required if not applicable.
:type reserved_resource_properties:
Expand All @@ -466,6 +493,7 @@ class PurchaseRequest(Model):
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'},
'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'},
'renew': {'key': 'properties.renew', 'type': 'bool'},
'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'},
}

Expand All @@ -480,6 +508,7 @@ def __init__(self, **kwargs):
self.display_name = kwargs.get('display_name', None)
self.applied_scope_type = kwargs.get('applied_scope_type', None)
self.applied_scopes = kwargs.get('applied_scopes', None)
self.renew = kwargs.get('renew', None)
self.reserved_resource_properties = kwargs.get('reserved_resource_properties', None)


Expand All @@ -501,6 +530,50 @@ def __init__(self, **kwargs):
self.instance_flexibility = kwargs.get('instance_flexibility', None)


class RenewPropertiesResponse(Model):
"""RenewPropertiesResponse.

:param purchase_properties:
:type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest
:param locked_price_total: Locked currency & amount for new reservation
purchase at the time of renewal. Price is locked 30 days before expiry
date time if renew is true.
:type locked_price_total:
~azure.mgmt.reservations.models.RenewPropertiesResponseLockedPriceTotal
"""

_attribute_map = {
'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'},
'locked_price_total': {'key': 'lockedPriceTotal', 'type': 'RenewPropertiesResponseLockedPriceTotal'},
}

def __init__(self, **kwargs):
super(RenewPropertiesResponse, self).__init__(**kwargs)
self.purchase_properties = kwargs.get('purchase_properties', None)
self.locked_price_total = kwargs.get('locked_price_total', None)


class RenewPropertiesResponseLockedPriceTotal(Model):
"""Locked currency & amount for new reservation purchase at the time of
renewal. Price is locked 30 days before expiry date time if renew is true.

:param currency_code:
:type currency_code: str
:param amount:
:type amount: str
"""

_attribute_map = {
'currency_code': {'key': 'currencyCode', 'type': 'str'},
'amount': {'key': 'amount', 'type': 'str'},
}

def __init__(self, **kwargs):
super(RenewPropertiesResponseLockedPriceTotal, self).__init__(**kwargs)
self.currency_code = kwargs.get('currency_code', None)
self.amount = kwargs.get('amount', None)


class ReservationMergeProperties(Model):
"""ReservationMergeProperties.

Expand Down Expand Up @@ -642,6 +715,21 @@ class ReservationProperties(Model):
:param merge_properties:
:type merge_properties:
~azure.mgmt.reservations.models.ReservationMergeProperties
:param billing_scope_id:
:type billing_scope_id: str
:param renew:
:type renew: bool
:param renew_source: Reservation Id of the reservation from which this
reservation is renewed. Format of the resource Id is
/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
:type renew_source: str
:param renew_destination: Reservation Id of the reservation which is
purchased because of renew. Format of the resource Id is
/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
:type renew_destination: str
:param renew_properties:
:type renew_properties:
~azure.mgmt.reservations.models.RenewPropertiesResponse
"""

_validation = {
Expand All @@ -663,6 +751,11 @@ class ReservationProperties(Model):
'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'},
'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'},
'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'},
'billing_scope_id': {'key': 'billingScopeId', 'type': 'str'},
'renew': {'key': 'renew', 'type': 'bool'},
'renew_source': {'key': 'renewSource', 'type': 'str'},
'renew_destination': {'key': 'renewDestination', 'type': 'str'},
'renew_properties': {'key': 'renewProperties', 'type': 'RenewPropertiesResponse'},
}

def __init__(self, **kwargs):
Expand All @@ -681,6 +774,11 @@ def __init__(self, **kwargs):
self.extended_status_info = kwargs.get('extended_status_info', None)
self.split_properties = kwargs.get('split_properties', None)
self.merge_properties = kwargs.get('merge_properties', None)
self.billing_scope_id = kwargs.get('billing_scope_id', None)
self.renew = kwargs.get('renew', None)
self.renew_source = kwargs.get('renew_source', None)
self.renew_destination = kwargs.get('renew_destination', None)
self.renew_properties = kwargs.get('renew_properties', None)


class ReservationResponse(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,21 +409,46 @@ class Patch(Model):
~azure.mgmt.reservations.models.InstanceFlexibility
:param name: Name of the Reservation
:type name: str
:param renew:
:type renew: bool
:param renew_properties:
:type renew_properties:
~azure.mgmt.reservations.models.PatchPropertiesRenewProperties
"""

_attribute_map = {
'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'},
'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'},
'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'},
'name': {'key': 'properties.name', 'type': 'str'},
'renew': {'key': 'properties.renew', 'type': 'bool'},
'renew_properties': {'key': 'properties.renewProperties', 'type': 'PatchPropertiesRenewProperties'},
}

def __init__(self, *, applied_scope_type=None, applied_scopes=None, instance_flexibility=None, name: str=None, **kwargs) -> None:
def __init__(self, *, applied_scope_type=None, applied_scopes=None, instance_flexibility=None, name: str=None, renew: bool=None, renew_properties=None, **kwargs) -> None:
super(Patch, self).__init__(**kwargs)
self.applied_scope_type = applied_scope_type
self.applied_scopes = applied_scopes
self.instance_flexibility = instance_flexibility
self.name = name
self.renew = renew
self.renew_properties = renew_properties


class PatchPropertiesRenewProperties(Model):
"""PatchPropertiesRenewProperties.

:param purchase_properties:
:type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest
"""

_attribute_map = {
'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'},
}

def __init__(self, *, purchase_properties=None, **kwargs) -> None:
super(PatchPropertiesRenewProperties, self).__init__(**kwargs)
self.purchase_properties = purchase_properties


class PurchaseRequest(Model):
Expand All @@ -450,6 +475,8 @@ class PurchaseRequest(Model):
~azure.mgmt.reservations.models.AppliedScopeType
:param applied_scopes:
:type applied_scopes: list[str]
:param renew:
:type renew: bool
:param reserved_resource_properties: Properties specific to each reserved
resource type. Not required if not applicable.
:type reserved_resource_properties:
Expand All @@ -466,10 +493,11 @@ class PurchaseRequest(Model):
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'},
'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'},
'renew': {'key': 'properties.renew', 'type': 'bool'},
'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'},
}

def __init__(self, *, sku=None, location: str=None, reserved_resource_type=None, billing_scope_id: str=None, term=None, quantity: int=None, display_name: str=None, applied_scope_type=None, applied_scopes=None, reserved_resource_properties=None, **kwargs) -> None:
def __init__(self, *, sku=None, location: str=None, reserved_resource_type=None, billing_scope_id: str=None, term=None, quantity: int=None, display_name: str=None, applied_scope_type=None, applied_scopes=None, renew: bool=None, reserved_resource_properties=None, **kwargs) -> None:
super(PurchaseRequest, self).__init__(**kwargs)
self.sku = sku
self.location = location
Expand All @@ -480,6 +508,7 @@ def __init__(self, *, sku=None, location: str=None, reserved_resource_type=None,
self.display_name = display_name
self.applied_scope_type = applied_scope_type
self.applied_scopes = applied_scopes
self.renew = renew
self.reserved_resource_properties = reserved_resource_properties


Expand All @@ -501,6 +530,50 @@ def __init__(self, *, instance_flexibility=None, **kwargs) -> None:
self.instance_flexibility = instance_flexibility


class RenewPropertiesResponse(Model):
"""RenewPropertiesResponse.

:param purchase_properties:
:type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest
:param locked_price_total: Locked currency & amount for new reservation
purchase at the time of renewal. Price is locked 30 days before expiry
date time if renew is true.
:type locked_price_total:
~azure.mgmt.reservations.models.RenewPropertiesResponseLockedPriceTotal
"""

_attribute_map = {
'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'},
'locked_price_total': {'key': 'lockedPriceTotal', 'type': 'RenewPropertiesResponseLockedPriceTotal'},
}

def __init__(self, *, purchase_properties=None, locked_price_total=None, **kwargs) -> None:
super(RenewPropertiesResponse, self).__init__(**kwargs)
self.purchase_properties = purchase_properties
self.locked_price_total = locked_price_total


class RenewPropertiesResponseLockedPriceTotal(Model):
"""Locked currency & amount for new reservation purchase at the time of
renewal. Price is locked 30 days before expiry date time if renew is true.

:param currency_code:
:type currency_code: str
:param amount:
:type amount: str
"""

_attribute_map = {
'currency_code': {'key': 'currencyCode', 'type': 'str'},
'amount': {'key': 'amount', 'type': 'str'},
}

def __init__(self, *, currency_code: str=None, amount: str=None, **kwargs) -> None:
super(RenewPropertiesResponseLockedPriceTotal, self).__init__(**kwargs)
self.currency_code = currency_code
self.amount = amount


class ReservationMergeProperties(Model):
"""ReservationMergeProperties.

Expand Down Expand Up @@ -642,6 +715,21 @@ class ReservationProperties(Model):
:param merge_properties:
:type merge_properties:
~azure.mgmt.reservations.models.ReservationMergeProperties
:param billing_scope_id:
:type billing_scope_id: str
:param renew:
:type renew: bool
:param renew_source: Reservation Id of the reservation from which this
reservation is renewed. Format of the resource Id is
/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
:type renew_source: str
:param renew_destination: Reservation Id of the reservation which is
purchased because of renew. Format of the resource Id is
/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
:type renew_destination: str
:param renew_properties:
:type renew_properties:
~azure.mgmt.reservations.models.RenewPropertiesResponse
"""

_validation = {
Expand All @@ -663,9 +751,14 @@ class ReservationProperties(Model):
'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'},
'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'},
'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'},
'billing_scope_id': {'key': 'billingScopeId', 'type': 'str'},
'renew': {'key': 'renew', 'type': 'bool'},
'renew_source': {'key': 'renewSource', 'type': 'str'},
'renew_destination': {'key': 'renewDestination', 'type': 'str'},
'renew_properties': {'key': 'renewProperties', 'type': 'RenewPropertiesResponse'},
}

def __init__(self, *, reserved_resource_type=None, instance_flexibility=None, display_name: str=None, applied_scopes=None, applied_scope_type=None, quantity: int=None, provisioning_state: str=None, effective_date_time=None, expiry_date=None, sku_description: str=None, extended_status_info=None, split_properties=None, merge_properties=None, **kwargs) -> None:
def __init__(self, *, reserved_resource_type=None, instance_flexibility=None, display_name: str=None, applied_scopes=None, applied_scope_type=None, quantity: int=None, provisioning_state: str=None, effective_date_time=None, expiry_date=None, sku_description: str=None, extended_status_info=None, split_properties=None, merge_properties=None, billing_scope_id: str=None, renew: bool=None, renew_source: str=None, renew_destination: str=None, renew_properties=None, **kwargs) -> None:
super(ReservationProperties, self).__init__(**kwargs)
self.reserved_resource_type = reserved_resource_type
self.instance_flexibility = instance_flexibility
Expand All @@ -681,6 +774,11 @@ def __init__(self, *, reserved_resource_type=None, instance_flexibility=None, di
self.extended_status_info = extended_status_info
self.split_properties = split_properties
self.merge_properties = merge_properties
self.billing_scope_id = billing_scope_id
self.renew = renew
self.renew_source = renew_source
self.renew_destination = renew_destination
self.renew_properties = renew_properties


class ReservationResponse(Model):
Expand Down
Loading