Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Generated from be9b791408e4113c2462d9df4c1b31c7d59dff09
Textual changes
  • Loading branch information
AutorestCI committed Jul 29, 2019
commit f08e4760098a9528ae1baed6e551aea582a03782
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class AdPrincipal(Model):
"""Active Directory Principal for subscription creation delegated permission.
"""Active Directory Principal who’ll get owner access on the new subscription.

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

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


class AdPrincipal(Model):
"""Active Directory Principal for subscription creation delegated permission.
"""Active Directory Principal who’ll get owner access on the new subscription.

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

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
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,30 +13,48 @@


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

:param display_name: The display name of the 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: The ARM id of the billing profile.
: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: The commerce id of the sku.
: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: optional customer cost center
:param cost_center: If set, the cost center will show up on the Azure
usage and charges file.
:type cost_center: str
:param owner: rbac owner of the subscription
: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}'},
}

Expand All @@ -47,4 +65,5 @@ def __init__(self, **kwargs):
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
Expand Up @@ -13,38 +13,57 @@


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

:param display_name: The display name of the 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: The ARM id of the billing profile.
: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: The commerce id of the sku.
: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: optional customer cost center
:param cost_center: If set, the cost center will show up on the Azure
usage and charges file.
:type cost_center: str
:param owner: rbac owner of the subscription
: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=None, billing_profile_id: str=None, sku_id: str=None, cost_center: str=None, owner=None, additional_parameters=None, **kwargs) -> None:
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 @@ -15,7 +15,8 @@
class SubscriptionCreationResult(Model):
"""The created subscription object.

:param subscription_link: The link to the new subscription.
:param subscription_link: The link to the new subscription. Use this link
to check the status of subscription creation operation.
:type subscription_link: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
class SubscriptionCreationResult(Model):
"""The created subscription object.

:param subscription_link: The link to the new subscription.
:param subscription_link: The link to the new subscription. Use this link
to check the status of subscription creation operation.
:type subscription_link: str
"""

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


class SubscriptionName(Model):
"""New name of the subscription.
"""The new name of the subscription.

:param subscription_name: New subscription name
:type subscription_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class SubscriptionName(Model):
"""New name of the subscription.
"""The new name of the subscription.

:param subscription_name: New subscription name
:type subscription_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ def _create_subscription_initial(

def create_subscription(
self, billing_account_name, invoice_section_name, body, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates an Azure subscription.
"""The operation to create a new Azure subscription.

:param billing_account_name: The name of the commerce root billing
account.
:param billing_account_name: The name of the Microsoft Customer
Agreement billing account for which you want to create the
subscription.
:type billing_account_name: str
:param invoice_section_name: The name of the invoice section.
:param invoice_section_name: The name of the invoice section in the
billing account for which you want to create the subscription.
:type invoice_section_name: str
:param body: The subscription creation parameters.
:type body:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):

def cancel(
self, subscription_id, custom_headers=None, raw=False, **operation_config):
"""Cancels the subscription.
"""The operation to cancel a subscription.

:param subscription_id: Subscription Id.
:type subscription_id: str
Expand Down Expand Up @@ -96,7 +96,7 @@ def cancel(

def rename(
self, subscription_id, subscription_name=None, custom_headers=None, raw=False, **operation_config):
"""Renames the subscription.
"""The operation to rename a subscription.

:param subscription_id: Subscription Id.
:type subscription_id: str
Expand Down