Skip to content

Commit

Permalink
azure-mgmt-subscription 0.2.0 (Azure#2241)
Browse files Browse the repository at this point in the history
* [AutoPR subscription/resource-manager] Update subscription creation ARM API in Microsoft.Subscription RP (Azure#2151)

* Generated from 549bb107521c6fdf98f1457ddf428365533d43ec

Adding the tag package-all-subscription

* Generated from 549bb107521c6fdf98f1457ddf428365533d43ec

Adding the tag package-all-subscription

* Generated from 549bb107521c6fdf98f1457ddf428365533d43ec

Adding the tag package-all-subscription

* Generated from d3a81860f0d4e8fc23f6237b567bd83800bf7c98

Merging subscriptions.json swagger from Microsoft.Resources in Microsoft.Subscriptions swagger so that --package-all-subscriptions tag can produce a single package

* Generated from bc4c1450cf8dc8df87549d97d5b72ff5adc82b88

Rename the client from SubscriptionManagementClient to SubscriptionClient

* Generated from 8c9aef6b7b051994d851dc31a02553bd1c86d9c6

making object id a string instead of guid, and removing tenant id

* Generated from 5d31f58c6b4599aa01d29e021de4c4e4f95c1e92

Updating examples

* Generated from 05e035962321bc79e13e898872e806e9d83f0d10

removed extra property from required in model

* Generated from 9a5ddb0a9715b1fcc0be692513773304b50122d3

Getting the new stable subscriptions.json

* [AutoPR subscription/resource-manager] Move subscription Go packages to preview directory (Azure#2245)

* Generated from 6853a53113c479a3a7ddf4fc20cbfac8024f862f

Move subscription Go packages to preview directory

* Generated from 6853a53113c479a3a7ddf4fc20cbfac8024f862f

Move subscription Go packages to preview directory

* [AutoPR subscription/resource-manager] [Subscription RP] Add AdditionalParameters property to SubscriptionCreationParameters (Azure#2253)

* Generated from de69c3e4d72748c44117593d70afe77108367ab4

Add additional parameters property to SubscriptionCreationParameters to support Microsoft-internal subscription creation scenarios.

* Generated from 414aee76280edbf815f8cec72cce1d66e5320222

Adding sample for additionalParameters property.

* Generated from 718893e615e1dac407482dd977c62bbca6eb6794

Fix: change type to object

* Generated from 61df9b4ccccf7c97942783d6fd43f190f593dc63

Add missing description to new additionalParameters property

* Generated from 61df9b4ccccf7c97942783d6fd43f190f593dc63

Add missing description to new additionalParameters property

* [AutoPR subscription/resource-manager] fix readme.md to include 2016/06/01 with 2018/03/01 always (Azure#2269)

* Generated from 30a2740c1ef0ec7715bd8ae16cad101eb6ba496b

fix readme.md to include 2016/06/01 with 2018/03/01 always

* Generated from 30a2740c1ef0ec7715bd8ae16cad101eb6ba496b

fix readme.md to include 2016/06/01 with 2018/03/01 always

* Remove subscription from specific clients

* Update version.py

* Add subscription creation test.

* Add history
  • Loading branch information
AutorestCI authored and lmazuel committed Mar 30, 2018
1 parent 36c0e16 commit 26bf05d
Show file tree
Hide file tree
Showing 44 changed files with 2,113 additions and 552 deletions.
5 changes: 5 additions & 0 deletions azure-mgmt-subscription/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

0.2.0 (2018-04-01)
++++++++++++++++++

* Add subscription creation API

0.1.0 (2017-12-11)
++++++++++++++++++

Expand Down
51 changes: 37 additions & 14 deletions azure-mgmt-subscription/azure/mgmt/subscription/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,61 @@
# regenerated.
# --------------------------------------------------------------------------

from .subscription_definition import SubscriptionDefinition
from .operation_display import OperationDisplay
from .operation import Operation
from .error_response import ErrorResponse, ErrorResponseException
from .location import Location
from .subscription_policies import SubscriptionPolicies
from .subscription import Subscription
from .tenant_id_description import TenantIdDescription
from .operation_paged import OperationPaged
from .subscription_definition_paged import SubscriptionDefinitionPaged
try:
from .subscription_creation_result_py3 import SubscriptionCreationResult
from .ad_principal_py3 import AdPrincipal
from .subscription_creation_parameters_py3 import SubscriptionCreationParameters
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .subscription_operation_py3 import SubscriptionOperation
from .subscription_operation_list_result_py3 import SubscriptionOperationListResult
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_list_result_py3 import OperationListResult
from .location_py3 import Location
from .subscription_policies_py3 import SubscriptionPolicies
from .subscription_py3 import Subscription
from .tenant_id_description_py3 import TenantIdDescription
except (SyntaxError, ImportError):
from .subscription_creation_result import SubscriptionCreationResult
from .ad_principal import AdPrincipal
from .subscription_creation_parameters import SubscriptionCreationParameters
from .error_response import ErrorResponse, ErrorResponseException
from .subscription_operation import SubscriptionOperation
from .subscription_operation_list_result import SubscriptionOperationListResult
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .location import Location
from .subscription_policies import SubscriptionPolicies
from .subscription import Subscription
from .tenant_id_description import TenantIdDescription
from .location_paged import LocationPaged
from .subscription_paged import SubscriptionPaged
from .tenant_id_description_paged import TenantIdDescriptionPaged
from .subscription_client_enums import (
OfferType,
SubscriptionState,
SpendingLimit,
)

__all__ = [
'SubscriptionDefinition',
'SubscriptionCreationResult',
'AdPrincipal',
'SubscriptionCreationParameters',
'ErrorResponse', 'ErrorResponseException',
'SubscriptionOperation',
'SubscriptionOperationListResult',
'OperationDisplay',
'Operation',
'ErrorResponse', 'ErrorResponseException',
'OperationListResult',
'Location',
'SubscriptionPolicies',
'Subscription',
'TenantIdDescription',
'OperationPaged',
'SubscriptionDefinitionPaged',
'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 for subscription creation delegated permission.
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 for subscription creation delegated permission.
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 @@ -27,9 +27,10 @@ class ErrorResponse(Model):
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, code=None, message=None):
self.code = code
self.message = message
def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)


class ErrorResponseException(HttpOperationError):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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
from msrest.exceptions import HttpOperationError


class ErrorResponse(Model):
"""Describes the format of Error response.
:param code: Error code
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
super(ErrorResponse, self).__init__(**kwargs)
self.code = code
self.message = message


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class Location(Model):
'longitude': {'key': 'longitude', 'type': 'str'},
}

def __init__(self):
def __init__(self, **kwargs):
super(Location, self).__init__(**kwargs)
self.id = None
self.subscription_id = None
self.name = None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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 Location(Model):
"""Location information.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The fully qualified ID of the location. For example,
/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
:vartype id: str
:ivar subscription_id: The subscription ID.
:vartype subscription_id: str
:ivar name: The location name.
:vartype name: str
:ivar display_name: The display name of the location.
:vartype display_name: str
:ivar latitude: The latitude of the location.
:vartype latitude: str
:ivar longitude: The longitude of the location.
:vartype longitude: str
"""

_validation = {
'id': {'readonly': True},
'subscription_id': {'readonly': True},
'name': {'readonly': True},
'display_name': {'readonly': True},
'latitude': {'readonly': True},
'longitude': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'latitude': {'key': 'latitude', 'type': 'str'},
'longitude': {'key': 'longitude', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(Location, self).__init__(**kwargs)
self.id = None
self.subscription_id = None
self.name = None
self.display_name = None
self.latitude = None
self.longitude = None
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Operation(Model):
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, name=None, display=None):
self.name = name
self.display = display
def __init__(self, **kwargs):
super(Operation, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display = kwargs.get('display', None)
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class OperationDisplay(Model):
'operation': {'key': 'operation', 'type': 'str'},
}

def __init__(self, provider=None, resource=None, operation=None):
self.provider = provider
self.resource = resource
self.operation = operation
def __init__(self, **kwargs):
super(OperationDisplay, self).__init__(**kwargs)
self.provider = kwargs.get('provider', None)
self.resource = kwargs.get('resource', None)
self.operation = kwargs.get('operation', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 OperationDisplay(Model):
"""The object that represents the operation.
:param provider: Service provider: Microsoft.Subscription
:type provider: str
:param resource: Resource on which the operation is performed: Profile,
endpoint, etc.
:type resource: str
:param operation: Operation type: Read, write, delete, etc.
:type operation: str
"""

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
}

def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None:
super(OperationDisplay, self).__init__(**kwargs)
self.provider = provider
self.resource = resource
self.operation = operation
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 OperationListResult(Model):
"""Result of the request to list operations. It contains a list of operations
and a URL link to get the next set of results.
:param value: List of operations.
:type value: list[~azure.mgmt.subscription.models.Operation]
:param next_link: URL to get the next set of operation list results if
there are any.
:type next_link: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[Operation]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}

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

0 comments on commit 26bf05d

Please sign in to comment.