Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release azure-mgmt-subscription 0.6.0 #11841

Merged
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
21 changes: 21 additions & 0 deletions sdk/subscription/azure-mgmt-subscription/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Release History

## 0.6.0 (2020-06-05)

**Features**

- Model SubscriptionCreationParameters has a new parameter management_group_id
- Added operation SubscriptionOperations.create_subscription_in_enrollment_account
- Added operation SubscriptionOperations.create_subscription
- Added operation SubscriptionOperations.create_csp_subscription
- Added operation SubscriptionOperations.cancel
- Added operation SubscriptionOperations.rename
- Added operation SubscriptionOperations.enable

**Breaking changes**

- Model ModernSubscriptionCreationParameters no longer has parameter billing_profile_id
- Removed operation SubscriptionsOperations.cancel
- Removed operation SubscriptionsOperations.rename
- Removed operation SubscriptionsOperations.enable
- Removed operation SubscriptionOperations.list
- Removed operation group SubscriptionFactoryOperations

## 0.5.0 (2019-08-21)

**Features**
Expand Down
30 changes: 11 additions & 19 deletions sdk/subscription/azure-mgmt-subscription/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
## Microsoft Azure SDK for Python
# Microsoft Azure SDK for Python

This is the Microsoft Azure Subscription Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)

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.5, 3.6 and 3.7.
# Usage

For the older Azure Service Management (ASM) libraries, see
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
library.
For code examples, see [Subscription Management](https://docs.microsoft.com/python/api/overview/azure/)
on docs.microsoft.com.

For a more complete set of Azure libraries, see the
[azure](https://pypi.python.org/pypi/azure) bundle package.

## Usage
# Provide Feedback

For code examples, see [Subscription
Management](https://docs.microsoft.com/python/api/overview/azure/) on
docs.microsoft.com.

## Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.

![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-subscription%2FREADME.png)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-subscription%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

from ._configuration import SubscriptionClientConfiguration
from .operations import SubscriptionsOperations
from .operations import SubscriptionOperationOperations
from .operations import SubscriptionFactoryOperations
from .operations import TenantsOperations
from .operations import SubscriptionOperations
from .operations import SubscriptionOperationOperations
from .operations import Operations
from .operations import TenantsOperations
from . import models


Expand All @@ -30,16 +29,14 @@ class SubscriptionClient(SDKClient):

:ivar subscriptions: Subscriptions operations
:vartype subscriptions: azure.mgmt.subscription.operations.SubscriptionsOperations
:ivar tenants: Tenants operations
:vartype tenants: azure.mgmt.subscription.operations.TenantsOperations
:ivar subscription: Subscription operations
:vartype subscription: azure.mgmt.subscription.operations.SubscriptionOperations
:ivar subscription_operation: SubscriptionOperation operations
:vartype subscription_operation: azure.mgmt.subscription.operations.SubscriptionOperationOperations
:ivar subscription_factory: SubscriptionFactory operations
:vartype subscription_factory: azure.mgmt.subscription.operations.SubscriptionFactoryOperations
:ivar subscription_operations: SubscriptionOperations operations
:vartype subscription_operations: azure.mgmt.subscription.operations.SubscriptionOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.subscription.operations.Operations
:ivar tenants: Tenants operations
:vartype tenants: azure.mgmt.subscription.operations.TenantsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -59,13 +56,11 @@ def __init__(

self.subscriptions = SubscriptionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.subscription_operation = SubscriptionOperationOperations(
self.tenants = TenantsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.subscription_factory = SubscriptionFactoryOperations(
self.subscription = SubscriptionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.subscription_operations = SubscriptionOperations(
self.subscription_operation = SubscriptionOperationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.tenants = TenantsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
from ._models_py3 import SubscriptionCreationParameters
from ._models_py3 import SubscriptionCreationResult
from ._models_py3 import SubscriptionName
from ._models_py3 import SubscriptionOperation
from ._models_py3 import SubscriptionOperationListResult
from ._models_py3 import SubscriptionPolicies
from ._models_py3 import TenantIdDescription
except (SyntaxError, ImportError):
Expand All @@ -45,17 +43,15 @@
from ._models import SubscriptionCreationParameters
from ._models import SubscriptionCreationResult
from ._models import SubscriptionName
from ._models import SubscriptionOperation
from ._models import SubscriptionOperationListResult
from ._models import SubscriptionPolicies
from ._models import TenantIdDescription
from ._paged_models import LocationPaged
from ._paged_models import SubscriptionPaged
from ._paged_models import TenantIdDescriptionPaged
from ._subscription_client_enums import (
OfferType,
SubscriptionState,
SpendingLimit,
OfferType,
)

__all__ = [
Expand All @@ -74,14 +70,12 @@
'SubscriptionCreationParameters',
'SubscriptionCreationResult',
'SubscriptionName',
'SubscriptionOperation',
'SubscriptionOperationListResult',
'SubscriptionPolicies',
'TenantIdDescription',
'LocationPaged',
'SubscriptionPaged',
'TenantIdDescriptionPaged',
'OfferType',
'SubscriptionState',
'SpendingLimit',
'OfferType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ class ModernCspSubscriptionCreationParameters(Model):
:type sku_id: str
:param reseller_id: Reseller ID, basically MPN Id.
:type reseller_id: str
:param service_provider_id: Service provider ID, basically MPN Id.
:type service_provider_id: str
"""

_validation = {
Expand All @@ -197,15 +195,13 @@ class ModernCspSubscriptionCreationParameters(Model):
'display_name': {'key': 'displayName', 'type': 'str'},
'sku_id': {'key': 'skuId', 'type': 'str'},
'reseller_id': {'key': 'resellerId', 'type': 'str'},
'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ModernCspSubscriptionCreationParameters, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.sku_id = kwargs.get('sku_id', None)
self.reseller_id = kwargs.get('reseller_id', None)
self.service_provider_id = kwargs.get('service_provider_id', None)


class ModernSubscriptionCreationParameters(Model):
Expand All @@ -215,9 +211,6 @@ class ModernSubscriptionCreationParameters(Model):

: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
Expand All @@ -240,13 +233,11 @@ class ModernSubscriptionCreationParameters(Model):

_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'},
Expand All @@ -257,7 +248,6 @@ class ModernSubscriptionCreationParameters(Model):
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)
Expand Down Expand Up @@ -413,6 +403,8 @@ class SubscriptionCreationParameters(Model):

:param display_name: The display name of the subscription.
:type display_name: str
:param management_group_id: The Management Group Id.
:type management_group_id: 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.
Expand All @@ -430,6 +422,7 @@ class SubscriptionCreationParameters(Model):

_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'management_group_id': {'key': 'managementGroupId', 'type': 'str'},
'owners': {'key': 'owners', 'type': '[AdPrincipal]'},
'offer_type': {'key': 'offerType', 'type': 'str'},
'additional_parameters': {'key': 'additionalParameters', 'type': '{object}'},
Expand All @@ -438,6 +431,7 @@ class SubscriptionCreationParameters(Model):
def __init__(self, **kwargs):
super(SubscriptionCreationParameters, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.management_group_id = kwargs.get('management_group_id', None)
self.owners = kwargs.get('owners', None)
self.offer_type = kwargs.get('offer_type', None)
self.additional_parameters = kwargs.get('additional_parameters', None)
Expand Down Expand Up @@ -476,53 +470,6 @@ def __init__(self, **kwargs):
self.subscription_name = kwargs.get('subscription_name', None)


class SubscriptionOperation(Model):
"""status of the subscription POST operation.

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

:ivar id: The operation Id.
:vartype id: str
:param status: Status of the pending subscription
:type status: str
:param status_detail: Status Detail of the pending subscription
:type status_detail: str
"""

_validation = {
'id': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
'status_detail': {'key': 'statusDetail', 'type': 'str'},
}

def __init__(self, **kwargs):
super(SubscriptionOperation, self).__init__(**kwargs)
self.id = None
self.status = kwargs.get('status', None)
self.status_detail = kwargs.get('status_detail', None)


class SubscriptionOperationListResult(Model):
"""A list of pending subscription operations.

:param value: A list of pending SubscriptionOperations
:type value: list[~azure.mgmt.subscription.models.SubscriptionOperation]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[SubscriptionOperation]'},
}

def __init__(self, **kwargs):
super(SubscriptionOperationListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)


class SubscriptionPolicies(Model):
"""Subscription policies.

Expand Down
Loading