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

[AutoPR azure-mgmt-msi] [Mirror] add clear-output-folder in resource-manager readme.typescript.md to f… #124

Closed
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
7 changes: 4 additions & 3 deletions sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .managed_service_identity_client import ManagedServiceIdentityClient
from .version import VERSION
from ._configuration import ManagedServiceIdentityClientConfiguration
from ._managed_service_identity_client import ManagedServiceIdentityClient
__all__ = ['ManagedServiceIdentityClient', 'ManagedServiceIdentityClientConfiguration']

__all__ = ['ManagedServiceIdentityClient']
from .version import VERSION

__version__ = VERSION

49 changes: 49 additions & 0 deletions sdk/resources/azure-mgmt-msi/azure/mgmt/msi/_configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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 msrestazure import AzureConfiguration

from .version import VERSION


class ManagedServiceIdentityClientConfiguration(AzureConfiguration):
"""Configuration for ManagedServiceIdentityClient
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 subscription_id: The Id of the Subscription to which the identity
belongs.
:type subscription_id: str
:param str base_url: Service URL
"""

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

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

super(ManagedServiceIdentityClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

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

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,11 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.operations import Operations
from .operations.user_assigned_identities_operations import UserAssignedIdentitiesOperations
from . import models


class ManagedServiceIdentityClientConfiguration(AzureConfiguration):
"""Configuration for ManagedServiceIdentityClient
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 subscription_id: The Id of the Subscription to which the identity
belongs.
:type subscription_id: str
:param str base_url: Service URL
"""

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

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

super(ManagedServiceIdentityClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials
self.subscription_id = subscription_id
from ._configuration import ManagedServiceIdentityClientConfiguration
from .operations import Operations
from .operations import UserAssignedIdentitiesOperations
from . import models


class ManagedServiceIdentityClient(SDKClient):
Expand Down
20 changes: 10 additions & 10 deletions sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
# --------------------------------------------------------------------------

try:
from .identity_py3 import Identity
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from ._models_py3 import Identity
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
except (SyntaxError, ImportError):
from .identity import Identity
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_paged import OperationPaged
from .identity_paged import IdentityPaged
from .managed_service_identity_client_enums import (
from ._models import Identity
from ._models import Operation
from ._models import OperationDisplay
from ._paged_models import IdentityPaged
from ._paged_models import OperationPaged
from ._managed_service_identity_client_enums import (
UserAssignedIdentities,
)

__all__ = [
'Identity',
'OperationDisplay',
'Operation',
'OperationDisplay',
'OperationPaged',
'IdentityPaged',
'UserAssignedIdentities',
Expand Down
196 changes: 196 additions & 0 deletions sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
# 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 CloudError(Model):
"""An error response from the ManagedServiceIdentity service.

:param error: A list of additional details about the error.
:type error: ~azure.mgmt.msi.models.CloudErrorBody
"""

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

def __init__(self, **kwargs):
super(CloudError, self).__init__(**kwargs)
self.error = kwargs.get('error', None)


class CloudErrorException(HttpOperationError):
"""Server responsed with exception of type: 'CloudError'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

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

super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args)


class CloudErrorBody(Model):
"""An error response from the ManagedServiceIdentity service.

:param code: An identifier for the error.
:type code: str
:param message: A message describing the error, intended to be suitable
for display in a user interface.
:type message: str
:param target: The target of the particular error. For example, the name
of the property in error.
:type target: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.msi.models.CloudErrorBody]
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[CloudErrorBody]'},
}

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


class Identity(Model):
"""Describes an identity resource.

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

:ivar id: The id of the created identity.
:vartype id: str
:ivar name: The name of the created identity.
:vartype name: str
:param location: The Azure region where the identity lives.
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:ivar tenant_id: The id of the tenant which the identity belongs to.
:vartype tenant_id: str
:ivar principal_id: The id of the service principal object associated with
the created identity.
:vartype principal_id: str
:ivar client_id: The id of the app associated with the identity. This is a
random generated UUID by MSI.
:vartype client_id: str
:ivar client_secret_url: The ManagedServiceIdentity DataPlane URL that
can be queried to obtain the identity credentials. If identity is user
assigned, then the clientSecretUrl will not be present in the response,
otherwise it will be present.
:vartype client_secret_url: str
:ivar type: The type of resource i.e.
Microsoft.ManagedIdentity/userAssignedIdentities. Possible values include:
'Microsoft.ManagedIdentity/userAssignedIdentities'
:vartype type: str or ~azure.mgmt.msi.models.UserAssignedIdentities
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'tenant_id': {'readonly': True},
'principal_id': {'readonly': True},
'client_id': {'readonly': True},
'client_secret_url': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
'principal_id': {'key': 'properties.principalId', 'type': 'str'},
'client_id': {'key': 'properties.clientId', 'type': 'str'},
'client_secret_url': {'key': 'properties.clientSecretUrl', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, **kwargs):
super(Identity, self).__init__(**kwargs)
self.id = None
self.name = None
self.location = kwargs.get('location', None)
self.tags = kwargs.get('tags', None)
self.tenant_id = None
self.principal_id = None
self.client_id = None
self.client_secret_url = None
self.type = None


class Operation(Model):
"""Microsoft.ManagedIdentity Operation.

Operation supported by the Microsoft.ManagedIdentity REST API.

:param name: Operation Name. The name of the REST Operation. This is of
the format {provider}/{resource}/{operation}.
:type name: str
:param display: Operation Display. The object that describes the
operation.
:type display: ~azure.mgmt.msi.models.OperationDisplay
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, **kwargs):
super(Operation, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display = kwargs.get('display', None)


class OperationDisplay(Model):
"""Operation Display.

The object that describes the operation.

:param provider: Resource Provider Name. Friendly name of the resource
provider.
:type provider: str
:param operation: Operation Type. The type of operation. For example:
read, write, delete.
:type operation: str
:param resource: Resource Type. The resource type on which the operation
is performed.
:type resource: str
:param description: Operation description. A description of the operation.
:type description: str
"""

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

def __init__(self, **kwargs):
super(OperationDisplay, self).__init__(**kwargs)
self.provider = kwargs.get('provider', None)
self.operation = kwargs.get('operation', None)
self.resource = kwargs.get('resource', None)
self.description = kwargs.get('description', None)
Loading