Skip to content

Commit 7b911bf

Browse files
authored
Release azure-mgmt-subscription 0.6.0 (Azure#11841)
add 2019-10-preview tag for luis
1 parent 9877e57 commit 7b911bf

15 files changed

+557
-766
lines changed

sdk/subscription/azure-mgmt-subscription/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Release History
22

3+
## 0.6.0 (2020-06-05)
4+
5+
**Features**
6+
7+
- Model SubscriptionCreationParameters has a new parameter management_group_id
8+
- Added operation SubscriptionOperations.create_subscription_in_enrollment_account
9+
- Added operation SubscriptionOperations.create_subscription
10+
- Added operation SubscriptionOperations.create_csp_subscription
11+
- Added operation SubscriptionOperations.cancel
12+
- Added operation SubscriptionOperations.rename
13+
- Added operation SubscriptionOperations.enable
14+
15+
**Breaking changes**
16+
17+
- Model ModernSubscriptionCreationParameters no longer has parameter billing_profile_id
18+
- Removed operation SubscriptionsOperations.cancel
19+
- Removed operation SubscriptionsOperations.rename
20+
- Removed operation SubscriptionsOperations.enable
21+
- Removed operation SubscriptionOperations.list
22+
- Removed operation group SubscriptionFactoryOperations
23+
324
## 0.5.0 (2019-08-21)
425

526
**Features**
Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
## Microsoft Azure SDK for Python
1+
# Microsoft Azure SDK for Python
22

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

5-
Azure Resource Manager (ARM) is the next generation of management APIs
6-
that replace the old Azure Service Management (ASM).
77

8-
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.
8+
# Usage
99

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

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

17-
## Usage
14+
# Provide Feedback
1815

19-
For code examples, see [Subscription
20-
Management](https://docs.microsoft.com/python/api/overview/azure/) on
21-
docs.microsoft.com.
22-
23-
## Provide Feedback
24-
25-
If you encounter any bugs or have suggestions, please file an issue in
26-
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2718
section of the project.
2819

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

sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_subscription_client.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414

1515
from ._configuration import SubscriptionClientConfiguration
1616
from .operations import SubscriptionsOperations
17-
from .operations import SubscriptionOperationOperations
18-
from .operations import SubscriptionFactoryOperations
17+
from .operations import TenantsOperations
1918
from .operations import SubscriptionOperations
19+
from .operations import SubscriptionOperationOperations
2020
from .operations import Operations
21-
from .operations import TenantsOperations
2221
from . import models
2322

2423

@@ -30,16 +29,14 @@ class SubscriptionClient(SDKClient):
3029
3130
:ivar subscriptions: Subscriptions operations
3231
:vartype subscriptions: azure.mgmt.subscription.operations.SubscriptionsOperations
32+
:ivar tenants: Tenants operations
33+
:vartype tenants: azure.mgmt.subscription.operations.TenantsOperations
34+
:ivar subscription: Subscription operations
35+
:vartype subscription: azure.mgmt.subscription.operations.SubscriptionOperations
3336
:ivar subscription_operation: SubscriptionOperation operations
3437
:vartype subscription_operation: azure.mgmt.subscription.operations.SubscriptionOperationOperations
35-
:ivar subscription_factory: SubscriptionFactory operations
36-
:vartype subscription_factory: azure.mgmt.subscription.operations.SubscriptionFactoryOperations
37-
:ivar subscription_operations: SubscriptionOperations operations
38-
:vartype subscription_operations: azure.mgmt.subscription.operations.SubscriptionOperations
3938
:ivar operations: Operations operations
4039
:vartype operations: azure.mgmt.subscription.operations.Operations
41-
:ivar tenants: Tenants operations
42-
:vartype tenants: azure.mgmt.subscription.operations.TenantsOperations
4340
4441
:param credentials: Credentials needed for the client to connect to Azure.
4542
:type credentials: :mod:`A msrestazure Credentials
@@ -59,13 +56,11 @@ def __init__(
5956

6057
self.subscriptions = SubscriptionsOperations(
6158
self._client, self.config, self._serialize, self._deserialize)
62-
self.subscription_operation = SubscriptionOperationOperations(
59+
self.tenants = TenantsOperations(
6360
self._client, self.config, self._serialize, self._deserialize)
64-
self.subscription_factory = SubscriptionFactoryOperations(
61+
self.subscription = SubscriptionOperations(
6562
self._client, self.config, self._serialize, self._deserialize)
66-
self.subscription_operations = SubscriptionOperations(
63+
self.subscription_operation = SubscriptionOperationOperations(
6764
self._client, self.config, self._serialize, self._deserialize)
6865
self.operations = Operations(
6966
self._client, self.config, self._serialize, self._deserialize)
70-
self.tenants = TenantsOperations(
71-
self._client, self.config, self._serialize, self._deserialize)

sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/__init__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
from ._models_py3 import SubscriptionCreationParameters
2626
from ._models_py3 import SubscriptionCreationResult
2727
from ._models_py3 import SubscriptionName
28-
from ._models_py3 import SubscriptionOperation
29-
from ._models_py3 import SubscriptionOperationListResult
3028
from ._models_py3 import SubscriptionPolicies
3129
from ._models_py3 import TenantIdDescription
3230
except (SyntaxError, ImportError):
@@ -45,17 +43,15 @@
4543
from ._models import SubscriptionCreationParameters
4644
from ._models import SubscriptionCreationResult
4745
from ._models import SubscriptionName
48-
from ._models import SubscriptionOperation
49-
from ._models import SubscriptionOperationListResult
5046
from ._models import SubscriptionPolicies
5147
from ._models import TenantIdDescription
5248
from ._paged_models import LocationPaged
5349
from ._paged_models import SubscriptionPaged
5450
from ._paged_models import TenantIdDescriptionPaged
5551
from ._subscription_client_enums import (
56-
OfferType,
5752
SubscriptionState,
5853
SpendingLimit,
54+
OfferType,
5955
)
6056

6157
__all__ = [
@@ -74,14 +70,12 @@
7470
'SubscriptionCreationParameters',
7571
'SubscriptionCreationResult',
7672
'SubscriptionName',
77-
'SubscriptionOperation',
78-
'SubscriptionOperationListResult',
7973
'SubscriptionPolicies',
8074
'TenantIdDescription',
8175
'LocationPaged',
8276
'SubscriptionPaged',
8377
'TenantIdDescriptionPaged',
84-
'OfferType',
8578
'SubscriptionState',
8679
'SpendingLimit',
80+
'OfferType',
8781
]

sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_models.py

Lines changed: 4 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ class ModernCspSubscriptionCreationParameters(Model):
184184
:type sku_id: str
185185
:param reseller_id: Reseller ID, basically MPN Id.
186186
:type reseller_id: str
187-
:param service_provider_id: Service provider ID, basically MPN Id.
188-
:type service_provider_id: str
189187
"""
190188

191189
_validation = {
@@ -197,15 +195,13 @@ class ModernCspSubscriptionCreationParameters(Model):
197195
'display_name': {'key': 'displayName', 'type': 'str'},
198196
'sku_id': {'key': 'skuId', 'type': 'str'},
199197
'reseller_id': {'key': 'resellerId', 'type': 'str'},
200-
'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'},
201198
}
202199

203200
def __init__(self, **kwargs):
204201
super(ModernCspSubscriptionCreationParameters, self).__init__(**kwargs)
205202
self.display_name = kwargs.get('display_name', None)
206203
self.sku_id = kwargs.get('sku_id', None)
207204
self.reseller_id = kwargs.get('reseller_id', None)
208-
self.service_provider_id = kwargs.get('service_provider_id', None)
209205

210206

211207
class ModernSubscriptionCreationParameters(Model):
@@ -215,9 +211,6 @@ class ModernSubscriptionCreationParameters(Model):
215211
216212
:param display_name: Required. The friendly name of the subscription.
217213
:type display_name: str
218-
:param billing_profile_id: Required. The ARM ID of the billing profile for
219-
which you want to create the subscription.
220-
:type billing_profile_id: str
221214
:param sku_id: Required. The SKU ID of the Azure plan. Azure plan
222215
determines the pricing and service-level agreement of the subscription.
223216
Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for
@@ -240,13 +233,11 @@ class ModernSubscriptionCreationParameters(Model):
240233

241234
_validation = {
242235
'display_name': {'required': True},
243-
'billing_profile_id': {'required': True},
244236
'sku_id': {'required': True},
245237
}
246238

247239
_attribute_map = {
248240
'display_name': {'key': 'displayName', 'type': 'str'},
249-
'billing_profile_id': {'key': 'billingProfileId', 'type': 'str'},
250241
'sku_id': {'key': 'skuId', 'type': 'str'},
251242
'cost_center': {'key': 'costCenter', 'type': 'str'},
252243
'owner': {'key': 'owner', 'type': 'AdPrincipal'},
@@ -257,7 +248,6 @@ class ModernSubscriptionCreationParameters(Model):
257248
def __init__(self, **kwargs):
258249
super(ModernSubscriptionCreationParameters, self).__init__(**kwargs)
259250
self.display_name = kwargs.get('display_name', None)
260-
self.billing_profile_id = kwargs.get('billing_profile_id', None)
261251
self.sku_id = kwargs.get('sku_id', None)
262252
self.cost_center = kwargs.get('cost_center', None)
263253
self.owner = kwargs.get('owner', None)
@@ -413,6 +403,8 @@ class SubscriptionCreationParameters(Model):
413403
414404
:param display_name: The display name of the subscription.
415405
:type display_name: str
406+
:param management_group_id: The Management Group Id.
407+
:type management_group_id: str
416408
:param owners: The list of principals that should be granted Owner access
417409
on the subscription. Principals should be of type User, Service Principal
418410
or Security Group.
@@ -430,6 +422,7 @@ class SubscriptionCreationParameters(Model):
430422

431423
_attribute_map = {
432424
'display_name': {'key': 'displayName', 'type': 'str'},
425+
'management_group_id': {'key': 'managementGroupId', 'type': 'str'},
433426
'owners': {'key': 'owners', 'type': '[AdPrincipal]'},
434427
'offer_type': {'key': 'offerType', 'type': 'str'},
435428
'additional_parameters': {'key': 'additionalParameters', 'type': '{object}'},
@@ -438,6 +431,7 @@ class SubscriptionCreationParameters(Model):
438431
def __init__(self, **kwargs):
439432
super(SubscriptionCreationParameters, self).__init__(**kwargs)
440433
self.display_name = kwargs.get('display_name', None)
434+
self.management_group_id = kwargs.get('management_group_id', None)
441435
self.owners = kwargs.get('owners', None)
442436
self.offer_type = kwargs.get('offer_type', None)
443437
self.additional_parameters = kwargs.get('additional_parameters', None)
@@ -476,53 +470,6 @@ def __init__(self, **kwargs):
476470
self.subscription_name = kwargs.get('subscription_name', None)
477471

478472

479-
class SubscriptionOperation(Model):
480-
"""status of the subscription POST operation.
481-
482-
Variables are only populated by the server, and will be ignored when
483-
sending a request.
484-
485-
:ivar id: The operation Id.
486-
:vartype id: str
487-
:param status: Status of the pending subscription
488-
:type status: str
489-
:param status_detail: Status Detail of the pending subscription
490-
:type status_detail: str
491-
"""
492-
493-
_validation = {
494-
'id': {'readonly': True},
495-
}
496-
497-
_attribute_map = {
498-
'id': {'key': 'id', 'type': 'str'},
499-
'status': {'key': 'status', 'type': 'str'},
500-
'status_detail': {'key': 'statusDetail', 'type': 'str'},
501-
}
502-
503-
def __init__(self, **kwargs):
504-
super(SubscriptionOperation, self).__init__(**kwargs)
505-
self.id = None
506-
self.status = kwargs.get('status', None)
507-
self.status_detail = kwargs.get('status_detail', None)
508-
509-
510-
class SubscriptionOperationListResult(Model):
511-
"""A list of pending subscription operations.
512-
513-
:param value: A list of pending SubscriptionOperations
514-
:type value: list[~azure.mgmt.subscription.models.SubscriptionOperation]
515-
"""
516-
517-
_attribute_map = {
518-
'value': {'key': 'value', 'type': '[SubscriptionOperation]'},
519-
}
520-
521-
def __init__(self, **kwargs):
522-
super(SubscriptionOperationListResult, self).__init__(**kwargs)
523-
self.value = kwargs.get('value', None)
524-
525-
526473
class SubscriptionPolicies(Model):
527474
"""Subscription policies.
528475

0 commit comments

Comments
 (0)