Skip to content

Commit

Permalink
[AutoPR] managedservices/resource-manager (#4676)
Browse files Browse the repository at this point in the history
* [AutoPR managedservices/resource-manager] add python readme (#4641)

* Generated from 0d1aa530d9811e1e0cd7a6926699ce6c78b6e1bd

add python readme

* Packaging update of azure-mgmt-managedservices

* Generated from 68de90ca9556a1be7e4ba6630ece46760cb219bf

fix dup

* Add azure-mgmt-managedservices module

* Update sdk_packaging.toml

* Packaging update of azure-mgmt-managedservices

* remove bad file

* Update HISTORY.rst
  • Loading branch information
AutorestCI authored and lmazuel committed May 14, 2019
1 parent cbc0564 commit 12de951
Show file tree
Hide file tree
Showing 47 changed files with 2,779 additions and 0 deletions.
9 changes: 9 additions & 0 deletions azure-mgmt-managedservices/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:
Release History
===============

0.1.0 (2019-05-14)
++++++++++++++++++

* Initial Release
5 changes: 5 additions & 0 deletions azure-mgmt-managedservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

33 changes: 33 additions & 0 deletions azure-mgmt-managedservices/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure Managed Services Client Library.

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.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Usage
=====

For code examples, see `Managed Services
<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>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-managedservices%2FREADME.png
1 change: 1 addition & 0 deletions azure-mgmt-managedservices/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-managedservices/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
18 changes: 18 additions & 0 deletions azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .managed_services_client import ManagedServicesClient
from .version import VERSION

__all__ = ['ManagedServicesClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.registration_definitions_operations import RegistrationDefinitionsOperations
from .operations.registration_assignments_operations import RegistrationAssignmentsOperations
from .operations.operations import Operations
from . import models


class ManagedServicesClientConfiguration(AzureConfiguration):
"""Configuration for ManagedServicesClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
"""

def __init__(
self, credentials, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ManagedServicesClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-managedservices/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials


class ManagedServicesClient(SDKClient):
"""Specification for ManagedServices.
:ivar config: Configuration for client.
:vartype config: ManagedServicesClientConfiguration
:ivar registration_definitions: RegistrationDefinitions operations
:vartype registration_definitions: azure.mgmt.managedservices.operations.RegistrationDefinitionsOperations
:ivar registration_assignments: RegistrationAssignments operations
:vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.managedservices.operations.Operations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
"""

def __init__(
self, credentials, base_url=None):

self.config = ManagedServicesClientConfiguration(credentials, base_url)
super(ManagedServicesClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-06-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.registration_definitions = RegistrationDefinitionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.registration_assignments = RegistrationAssignmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 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.
# --------------------------------------------------------------------------

try:
from .authorization_py3 import Authorization
from .registration_definition_properties_py3 import RegistrationDefinitionProperties
from .plan_py3 import Plan
from .registration_definition_py3 import RegistrationDefinition
from .registration_assignment_properties_registration_definition_properties_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties
from .registration_assignment_properties_registration_definition_py3 import RegistrationAssignmentPropertiesRegistrationDefinition
from .registration_assignment_properties_py3 import RegistrationAssignmentProperties
from .registration_assignment_py3 import RegistrationAssignment
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_list_py3 import OperationList
from .error_response_error_py3 import ErrorResponseError
from .error_response_py3 import ErrorResponse, ErrorResponseException
except (SyntaxError, ImportError):
from .authorization import Authorization
from .registration_definition_properties import RegistrationDefinitionProperties
from .plan import Plan
from .registration_definition import RegistrationDefinition
from .registration_assignment_properties_registration_definition_properties import RegistrationAssignmentPropertiesRegistrationDefinitionProperties
from .registration_assignment_properties_registration_definition import RegistrationAssignmentPropertiesRegistrationDefinition
from .registration_assignment_properties import RegistrationAssignmentProperties
from .registration_assignment import RegistrationAssignment
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list import OperationList
from .error_response_error import ErrorResponseError
from .error_response import ErrorResponse, ErrorResponseException
from .registration_definition_paged import RegistrationDefinitionPaged
from .registration_assignment_paged import RegistrationAssignmentPaged
from .managed_services_client_enums import (
ProvisioningState,
)

__all__ = [
'Authorization',
'RegistrationDefinitionProperties',
'Plan',
'RegistrationDefinition',
'RegistrationAssignmentPropertiesRegistrationDefinitionProperties',
'RegistrationAssignmentPropertiesRegistrationDefinition',
'RegistrationAssignmentProperties',
'RegistrationAssignment',
'OperationDisplay',
'Operation',
'OperationList',
'ErrorResponseError',
'ErrorResponse', 'ErrorResponseException',
'RegistrationDefinitionPaged',
'RegistrationAssignmentPaged',
'ProvisioningState',
]
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


class Authorization(Model):
"""Authorization tuple containing principal Id (of user/service
principal/security group) and role definition id.
All required parameters must be populated in order to send to Azure.
:param principal_id: Required. Principal Id of the security group/service
principal/user that would be assigned permissions to the projected
subscription
:type principal_id: str
:param role_definition_id: Required. The role definition identifier. This
role will define all the permissions that the security group/service
principal/user must have on the projected subscription. This role cannot
be an owner role.
:type role_definition_id: str
"""

_validation = {
'principal_id': {'required': True},
'role_definition_id': {'required': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(Authorization, self).__init__(**kwargs)
self.principal_id = kwargs.get('principal_id', None)
self.role_definition_id = kwargs.get('role_definition_id', None)
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


class Authorization(Model):
"""Authorization tuple containing principal Id (of user/service
principal/security group) and role definition id.
All required parameters must be populated in order to send to Azure.
:param principal_id: Required. Principal Id of the security group/service
principal/user that would be assigned permissions to the projected
subscription
:type principal_id: str
:param role_definition_id: Required. The role definition identifier. This
role will define all the permissions that the security group/service
principal/user must have on the projected subscription. This role cannot
be an owner role.
:type role_definition_id: str
"""

_validation = {
'principal_id': {'required': True},
'role_definition_id': {'required': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'},
}

def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None:
super(Authorization, self).__init__(**kwargs)
self.principal_id = principal_id
self.role_definition_id = role_definition_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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):
"""Error response.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar error: Error response indicates Azure Resource Manager is not able
to process the incoming request. The reason is provided in the error
message.
:vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError
"""

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

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorResponseError'},
}

def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.error = None


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)
Loading

0 comments on commit 12de951

Please sign in to comment.