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
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_list_result_py3 import OperationListResult
from .subscription_creation_result_py3 import SubscriptionCreationResult
from .ad_principal_py3 import AdPrincipal
from .modern_subscription_creation_parameters_py3 import ModernSubscriptionCreationParameters
from .subscription_operation_py3 import SubscriptionOperation
from .subscription_operation_list_result_py3 import SubscriptionOperationListResult
from .subscription_creation_parameters_py3 import SubscriptionCreationParameters
from .location_py3 import Location
from .subscription_policies_py3 import SubscriptionPolicies
from .subscription_py3 import Subscription
Expand All @@ -31,6 +37,12 @@
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .subscription_creation_result import SubscriptionCreationResult
from .ad_principal import AdPrincipal
from .modern_subscription_creation_parameters import ModernSubscriptionCreationParameters
from .subscription_operation import SubscriptionOperation
from .subscription_operation_list_result import SubscriptionOperationListResult
from .subscription_creation_parameters import SubscriptionCreationParameters
from .location import Location
from .subscription_policies import SubscriptionPolicies
from .subscription import Subscription
Expand All @@ -39,6 +51,7 @@
from .subscription_paged import SubscriptionPaged
from .tenant_id_description_paged import TenantIdDescriptionPaged
from .subscription_client_enums import (
OfferType,
SubscriptionState,
SpendingLimit,
)
Expand All @@ -52,13 +65,20 @@
'OperationDisplay',
'Operation',
'OperationListResult',
'SubscriptionCreationResult',
'AdPrincipal',
'ModernSubscriptionCreationParameters',
'SubscriptionOperation',
'SubscriptionOperationListResult',
'SubscriptionCreationParameters',
'Location',
'SubscriptionPolicies',
'Subscription',
'TenantIdDescription',
'LocationPaged',
'SubscriptionPaged',
'TenantIdDescriptionPaged',
'OfferType',
'SubscriptionState',
'SpendingLimit',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AdPrincipal(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.

:param object_id: Required. Object id of the Principal
:type object_id: str
"""

_validation = {
'object_id': {'required': True},
}

_attribute_map = {
'object_id': {'key': 'objectId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AdPrincipal, self).__init__(**kwargs)
self.object_id = kwargs.get('object_id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AdPrincipal(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.

:param object_id: Required. Object id of the Principal
:type object_id: str
"""

_validation = {
'object_id': {'required': True},
}

_attribute_map = {
'object_id': {'key': 'objectId', 'type': 'str'},
}

def __init__(self, *, object_id: str, **kwargs) -> None:
super(AdPrincipal, self).__init__(**kwargs)
self.object_id = object_id
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@


class CanceledSubscriptionId(Model):
"""Canceled Subscription Id.
"""The ID of the canceled subscription.

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

:ivar value: Canceled Subscription Id
:ivar value: The ID of the canceled subscription
:vartype value: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@


class CanceledSubscriptionId(Model):
"""Canceled Subscription Id.
"""The ID of the canceled subscription.

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

:ivar value: Canceled Subscription Id
:ivar value: The ID of the canceled subscription
:vartype value: str
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ModernSubscriptionCreationParameters(Model):
"""The parameters required to create a new subscription.

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

:param display_name: Required. The friendly name of the subscription.
:type display_name: str
:param billing_profile_id: Required. The ARM ID of the billing profile for
which you want to create the subscription.
:type billing_profile_id: str
:param sku_id: 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.
:type sku_id: str
:param cost_center: If set, the cost center will show up on the Azure
usage and charges file.
:type cost_center: str
:param owner: If specified, the AD principal will get owner access to the
subscription, along with the user who is performing the create
subscription operation
:type owner: ~azure.mgmt.subscription.models.AdPrincipal
:param management_group_id: The identifier of the management group to
which this subscription will be associated.
:type management_group_id: str
:param additional_parameters: Additional, untyped parameters to support
custom subscription creation scenarios.
:type additional_parameters: dict[str, object]
"""

_validation = {
'display_name': {'required': True},
'billing_profile_id': {'required': True},
'sku_id': {'required': True},
}

_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'billing_profile_id': {'key': 'billingProfileId', 'type': 'str'},
'sku_id': {'key': 'skuId', 'type': 'str'},
'cost_center': {'key': 'costCenter', 'type': 'str'},
'owner': {'key': 'owner', 'type': 'AdPrincipal'},
'management_group_id': {'key': 'managementGroupId', 'type': 'str'},
'additional_parameters': {'key': 'additionalParameters', 'type': '{object}'},
}

def __init__(self, **kwargs):
super(ModernSubscriptionCreationParameters, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.billing_profile_id = kwargs.get('billing_profile_id', None)
self.sku_id = kwargs.get('sku_id', None)
self.cost_center = kwargs.get('cost_center', None)
self.owner = kwargs.get('owner', None)
self.management_group_id = kwargs.get('management_group_id', None)
self.additional_parameters = kwargs.get('additional_parameters', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ModernSubscriptionCreationParameters(Model):
"""The parameters required to create a new subscription.

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

:param display_name: Required. The friendly name of the subscription.
:type display_name: str
:param billing_profile_id: Required. The ARM ID of the billing profile for
which you want to create the subscription.
:type billing_profile_id: str
:param sku_id: 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.
:type sku_id: str
:param cost_center: If set, the cost center will show up on the Azure
usage and charges file.
:type cost_center: str
:param owner: If specified, the AD principal will get owner access to the
subscription, along with the user who is performing the create
subscription operation
:type owner: ~azure.mgmt.subscription.models.AdPrincipal
:param management_group_id: The identifier of the management group to
which this subscription will be associated.
:type management_group_id: str
:param additional_parameters: Additional, untyped parameters to support
custom subscription creation scenarios.
:type additional_parameters: dict[str, object]
"""

_validation = {
'display_name': {'required': True},
'billing_profile_id': {'required': True},
'sku_id': {'required': True},
}

_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'billing_profile_id': {'key': 'billingProfileId', 'type': 'str'},
'sku_id': {'key': 'skuId', 'type': 'str'},
'cost_center': {'key': 'costCenter', 'type': 'str'},
'owner': {'key': 'owner', 'type': 'AdPrincipal'},
'management_group_id': {'key': 'managementGroupId', 'type': 'str'},
'additional_parameters': {'key': 'additionalParameters', 'type': '{object}'},
}

def __init__(self, *, display_name: str, billing_profile_id: str, sku_id: str, cost_center: str=None, owner=None, management_group_id: str=None, additional_parameters=None, **kwargs) -> None:
super(ModernSubscriptionCreationParameters, self).__init__(**kwargs)
self.display_name = display_name
self.billing_profile_id = billing_profile_id
self.sku_id = sku_id
self.cost_center = cost_center
self.owner = owner
self.management_group_id = management_group_id
self.additional_parameters = additional_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@


class RenamedSubscriptionId(Model):
"""Renamed Subscription Id.
"""The ID of the subscriptions that is being renamed.

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

:ivar value: Renamed Subscription Id
:ivar value: The ID of the subscriptions that is being renamed
:vartype value: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@


class RenamedSubscriptionId(Model):
"""Renamed Subscription Id.
"""The ID of the subscriptions that is being renamed.

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

:ivar value: Renamed Subscription Id
:ivar value: The ID of the subscriptions that is being renamed
:vartype value: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
from enum import Enum


class OfferType(str, Enum):

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


class SubscriptionState(str, Enum):

enabled = "Enabled"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class SubscriptionCreationParameters(Model):
"""Subscription Creation Parameters required to create a new Azure
subscription.

:param display_name: The display name of the subscription.
:type display_name: str
:param owners: The list of principals that should be granted Owner access
on the subscription. Principals should be of type User, Service Principal
or Security Group.
:type owners: list[~azure.mgmt.subscription.models.AdPrincipal]
:param offer_type: 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'
:type offer_type: str or ~azure.mgmt.subscription.models.OfferType
:param additional_parameters: Additional, untyped parameters to support
custom subscription creation scenarios.
:type additional_parameters: dict[str, object]
"""

_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'owners': {'key': 'owners', 'type': '[AdPrincipal]'},
'offer_type': {'key': 'offerType', 'type': 'str'},
'additional_parameters': {'key': 'additionalParameters', 'type': '{object}'},
}

def __init__(self, **kwargs):
super(SubscriptionCreationParameters, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.owners = kwargs.get('owners', None)
self.offer_type = kwargs.get('offer_type', None)
self.additional_parameters = kwargs.get('additional_parameters', None)
Loading