Skip to content

Commit

Permalink
ga track2 authorization (#15503)
Browse files Browse the repository at this point in the history
  • Loading branch information
00Kai0 authored Nov 25, 2020
1 parent e520715 commit 2383277
Show file tree
Hide file tree
Showing 37 changed files with 479 additions and 421 deletions.
2 changes: 2 additions & 0 deletions sdk/authorization/azure-mgmt-authorization/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Release History

## 1.0.0 (2020-11-23)

## 1.0.0b1 (2020-10-13)

This is beta preview version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,33 @@
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false
"has_lro_operations": false,
"client_side_validation": false
},
"global_parameters": {
"sync_method": {
"sync": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"async": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -33,7 +33,7 @@ class ClassicAdministratorsOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -44,15 +44,15 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list(
self,
**kwargs
) -> AsyncIterable["models.ClassicAdministratorListResult"]:
) -> AsyncIterable["_models.ClassicAdministratorListResult"]:
"""Gets service administrator, account administrator, and co-administrators for the subscription.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ClassicAdministratorListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.authorization.v2015_06_01.models.ClassicAdministratorListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClassicAdministratorListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ClassicAdministratorListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.mgmt.core.exceptions import ARMErrorFormat

from .. import models
from .. import models as _models

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand All @@ -37,7 +37,7 @@ class ClassicAdministratorsOperations(object):
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer):
self._client = client
Expand All @@ -49,15 +49,15 @@ def list(
self,
**kwargs # type: Any
):
# type: (...) -> Iterable["models.ClassicAdministratorListResult"]
# type: (...) -> Iterable["_models.ClassicAdministratorListResult"]
"""Gets service administrator, account administrator, and co-administrators for the subscription.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ClassicAdministratorListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.authorization.v2015_06_01.models.ClassicAdministratorListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClassicAdministratorListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ClassicAdministratorListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,33 @@
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false
"has_lro_operations": false,
"client_side_validation": false
},
"global_parameters": {
"sync_method": {
"sync": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"async": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -33,7 +33,7 @@ class ClassicAdministratorsOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -44,15 +44,15 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list(
self,
**kwargs
) -> AsyncIterable["models.ClassicAdministratorListResult"]:
) -> AsyncIterable["_models.ClassicAdministratorListResult"]:
"""Gets service administrator, account administrator, and co-administrators for the subscription.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ClassicAdministratorListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.authorization.v2015_07_01.models.ClassicAdministratorListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClassicAdministratorListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ClassicAdministratorListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -32,7 +32,7 @@ class GlobalAdministratorOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -33,7 +33,7 @@ class PermissionsOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -45,7 +45,7 @@ def list_for_resource_group(
self,
resource_group_name: str,
**kwargs
) -> AsyncIterable["models.PermissionGetResult"]:
) -> AsyncIterable["_models.PermissionGetResult"]:
"""Gets all permissions the caller has for a resource group.
:param resource_group_name: The name of the resource group to get the permissions for. The name
Expand All @@ -56,7 +56,7 @@ def list_for_resource_group(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.authorization.v2015_07_01.models.PermissionGetResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.PermissionGetResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.PermissionGetResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -120,7 +120,7 @@ def list_for_resource(
resource_type: str,
resource_name: str,
**kwargs
) -> AsyncIterable["models.PermissionGetResult"]:
) -> AsyncIterable["_models.PermissionGetResult"]:
"""Gets all permissions the caller has for a resource.
:param resource_group_name: The name of the resource group containing the resource. The name is
Expand All @@ -139,7 +139,7 @@ def list_for_resource(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.authorization.v2015_07_01.models.PermissionGetResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.PermissionGetResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.PermissionGetResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -33,7 +33,7 @@ class ProviderOperationsMetadataOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -46,7 +46,7 @@ async def get(
resource_provider_namespace: str,
expand: Optional[str] = "resourceTypes",
**kwargs
) -> "models.ProviderOperationsMetadata":
) -> "_models.ProviderOperationsMetadata":
"""Gets provider operations metadata for the specified resource provider.
:param resource_provider_namespace: The namespace of the resource provider.
Expand All @@ -58,7 +58,7 @@ async def get(
:rtype: ~azure.mgmt.authorization.v2015_07_01.models.ProviderOperationsMetadata
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderOperationsMetadata"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ProviderOperationsMetadata"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -103,7 +103,7 @@ def list(
self,
expand: Optional[str] = "resourceTypes",
**kwargs
) -> AsyncIterable["models.ProviderOperationsMetadataListResult"]:
) -> AsyncIterable["_models.ProviderOperationsMetadataListResult"]:
"""Gets provider operations metadata for all resource providers.
:param expand: Specifies whether to expand the values.
Expand All @@ -113,7 +113,7 @@ def list(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.authorization.v2015_07_01.models.ProviderOperationsMetadataListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderOperationsMetadataListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ProviderOperationsMetadataListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Loading

0 comments on commit 2383277

Please sign in to comment.