From 561cde7af5eb64caa29c075e2949157bb3ff017f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 23 Nov 2021 19:55:31 +0000 Subject: [PATCH] CodeGen from PR 16859 in Azure/azure-rest-api-specs Merge 4e88b322082f0d59463c41760556bb7931edcb6a into 47b551f58ee1b24f4783c2e927b1673b39d87348 --- .../azure-mgmt-managedservices/_meta.json | 11 +- .../mgmt/managedservices/_configuration.py | 2 +- .../_managed_services_client.py | 2 +- .../azure/mgmt/managedservices/_metadata.json | 6 +- .../azure/mgmt/managedservices/_version.py | 2 +- .../managedservices/aio/_configuration.py | 2 +- .../aio/_managed_services_client.py | 2 +- ...ace_registration_definitions_operations.py | 17 +- ...on_definitions_without_scope_operations.py | 13 +- .../aio/operations/_operations.py | 4 +- .../_registration_assignments_operations.py | 57 +-- .../_registration_definitions_operations.py | 43 ++- .../mgmt/managedservices/models/__init__.py | 6 + .../models/_managed_services_client_enums.py | 4 +- .../mgmt/managedservices/models/_models.py | 322 +++++++++++------ .../managedservices/models/_models_py3.py | 333 ++++++++++++------ ...ace_registration_definitions_operations.py | 13 +- ...on_definitions_without_scope_operations.py | 9 +- .../managedservices/operations/_operations.py | 2 +- .../_registration_assignments_operations.py | 45 +-- .../_registration_definitions_operations.py | 33 +- 21 files changed, 584 insertions(+), 344 deletions(-) diff --git a/sdk/managedservices/azure-mgmt-managedservices/_meta.json b/sdk/managedservices/azure-mgmt-managedservices/_meta.json index 54ee6fe946b4..da77d4b8e209 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/_meta.json +++ b/sdk/managedservices/azure-mgmt-managedservices/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "528c0cffd4de3d4acdf451a1ea5f7cf6f3cb790c", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "0e6644c54a38a59abdf495fcdc2be6298583a194", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/managedservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "autorest_command": "autorest specification/managedservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/managedservices/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py index bd3d9ff2cae3..176099f215b5 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py @@ -42,7 +42,7 @@ def __init__( super(ManagedServicesClientConfiguration, self).__init__(**kwargs) self.credential = credential - self.api_version = "2020-02-01-preview" + self.api_version = "2021-11-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-managedservices/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py index fe7680c90761..5a6b762d5091 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py @@ -28,7 +28,7 @@ class ManagedServicesClient(object): - """Specification for ManagedServices. + """The specification for ManagedServices. :ivar registration_definitions: RegistrationDefinitionsOperations operations :vartype registration_definitions: azure.mgmt.managedservices.operations.RegistrationDefinitionsOperations diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json index 669a7cbee049..41a45707094c 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json @@ -1,10 +1,10 @@ { - "chosen_version": "2020-02-01-preview", - "total_api_version_list": ["2020-02-01-preview"], + "chosen_version": "2021-11-01-preview", + "total_api_version_list": ["2021-11-01-preview"], "client": { "name": "ManagedServicesClient", "filename": "_managed_services_client", - "description": "Specification for ManagedServices.", + "description": "The specification for ManagedServices.", "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, "azure_arm": true, diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py index caf312bd2d0b..eae7c95b6fbd 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "0.1.0" diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_configuration.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_configuration.py index 8137912f6407..b62b7f98b6f4 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_configuration.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_configuration.py @@ -39,7 +39,7 @@ def __init__( super(ManagedServicesClientConfiguration, self).__init__(**kwargs) self.credential = credential - self.api_version = "2020-02-01-preview" + self.api_version = "2021-11-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-managedservices/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py index 17ff8623156c..8c845cfd567e 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py @@ -26,7 +26,7 @@ class ManagedServicesClient(object): - """Specification for ManagedServices. + """The specification for ManagedServices. :ivar registration_definitions: RegistrationDefinitionsOperations operations :vartype registration_definitions: azure.mgmt.managedservices.aio.operations.RegistrationDefinitionsOperations diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py index 1358ed0dde29..6ca8516e775c 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py @@ -45,14 +45,13 @@ def list( self, scope: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MarketplaceRegistrationDefinitionList"]: """Gets a list of the marketplace registration definitions for the marketplace identifier. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param filter: The filter query parameter. Might be used to filter marketplace registration - definition by plan identifier, publisher, version etc. + :param filter: The filter query parameter to filter managed services resources by. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response) @@ -64,7 +63,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -121,13 +120,13 @@ async def get( self, scope: str, marketplace_identifier: str, - **kwargs + **kwargs: Any ) -> "_models.MarketplaceRegistrationDefinition": """Get the marketplace registration definition for the marketplace identifier. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param marketplace_identifier: Market place identifier. Expected Formats - + :param marketplace_identifier: The Azure Marketplace identifier. Expected formats: {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). :type marketplace_identifier: str @@ -141,7 +140,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py index 0c1b77114e06..c23083d88700 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py @@ -44,12 +44,11 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MarketplaceRegistrationDefinitionList"]: """Gets a list of the marketplace registration definitions for the marketplace identifier. - :param filter: The filter query parameter. Might be used to filter marketplace registration - definition by plan identifier, publisher, version etc. + :param filter: The filter query parameter to filter managed services resources by. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response) @@ -61,7 +60,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -113,11 +112,11 @@ async def get_next(next_link=None): async def get( self, marketplace_identifier: str, - **kwargs + **kwargs: Any ) -> "_models.MarketplaceRegistrationDefinition": """Get the marketplace registration definition for the marketplace identifier. - :param marketplace_identifier: Market place identifier. Expected Formats - + :param marketplace_identifier: The Azure Marketplace identifier. Expected formats: {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). :type marketplace_identifier: str @@ -131,7 +130,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py index f87b95beb0d7..6cbb0a486be8 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, - **kwargs + **kwargs: Any ) -> "_models.OperationList": """Gets a list of the operations. @@ -56,7 +56,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py index fd0f198794e3..34827956c36d 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py @@ -48,16 +48,16 @@ async def get( scope: str, registration_assignment_id: str, expand_registration_definition: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> "_models.RegistrationAssignment": - """Gets the details of specified registration assignment. + """Gets the details of the specified registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration assignment. + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str - :param expand_registration_definition: Tells whether to return registration definition details - also along with registration assignment details. + :param expand_registration_definition: The flag indicating whether to return the registration + definition details along with the registration assignment details. :type expand_registration_definition: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: RegistrationAssignment, or the result of cls(response) @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -111,14 +111,14 @@ async def _delete_initial( self, scope: str, registration_assignment_id: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -155,18 +155,18 @@ async def begin_delete( self, scope: str, registration_assignment_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the specified registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration assignment. + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -219,14 +219,14 @@ async def _create_or_update_initial( scope: str, registration_assignment_id: str, request_body: "_models.RegistrationAssignment", - **kwargs + **kwargs: Any ) -> "_models.RegistrationAssignment": cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistrationAssignment"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -276,20 +276,20 @@ async def begin_create_or_update( scope: str, registration_assignment_id: str, request_body: "_models.RegistrationAssignment", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.RegistrationAssignment"]: """Creates or updates a registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration assignment. + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str :param request_body: The parameters required to create new registration assignment. :type request_body: ~azure.mgmt.managedservices.models.RegistrationAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RegistrationAssignment or the result of cls(response) @@ -345,15 +345,18 @@ def list( self, scope: str, expand_registration_definition: Optional[bool] = None, - **kwargs + filter: Optional[str] = None, + **kwargs: Any ) -> AsyncIterable["_models.RegistrationAssignmentList"]: """Gets a list of the registration assignments. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param expand_registration_definition: Tells whether to return registration definition details - also along with registration assignment details. + :param expand_registration_definition: The flag indicating whether to return the registration + definition details along with the registration assignment details. :type expand_registration_definition: bool + :param filter: The filter query parameter to filter managed services resources by. + :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RegistrationAssignmentList or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managedservices.models.RegistrationAssignmentList] @@ -364,7 +367,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -384,6 +387,8 @@ def prepare_request(next_link=None): if expand_registration_definition is not None: query_parameters['$expandRegistrationDefinition'] = self._serialize.query("expand_registration_definition", expand_registration_definition, 'bool') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') request = self._client.get(url, query_parameters, header_parameters) else: diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py index 7603275c230a..d04e6cf207c8 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py @@ -47,13 +47,13 @@ async def get( self, scope: str, registration_definition_id: str, - **kwargs + **kwargs: Any ) -> "_models.RegistrationDefinition": """Gets the registration definition details. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_definition_id: Guid of the registration definition. + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RegistrationDefinition, or the result of cls(response) @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -105,13 +105,13 @@ async def delete( self, registration_definition_id: str, scope: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the registration definition. - :param registration_definition_id: Guid of the registration definition. + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -123,7 +123,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -161,14 +161,14 @@ async def _create_or_update_initial( registration_definition_id: str, scope: str, request_body: "_models.RegistrationDefinition", - **kwargs + **kwargs: Any ) -> "_models.RegistrationDefinition": cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistrationDefinition"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,20 +218,20 @@ async def begin_create_or_update( registration_definition_id: str, scope: str, request_body: "_models.RegistrationDefinition", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.RegistrationDefinition"]: """Creates or updates a registration definition. - :param registration_definition_id: Guid of the registration definition. + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param request_body: The parameters required to create new registration definition. + :param request_body: The parameters required to create a new registration definition. :type request_body: ~azure.mgmt.managedservices.models.RegistrationDefinition :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RegistrationDefinition or the result of cls(response) @@ -286,12 +286,15 @@ def get_long_running_output(pipeline_response): def list( self, scope: str, - **kwargs + filter: Optional[str] = None, + **kwargs: Any ) -> AsyncIterable["_models.RegistrationDefinitionList"]: """Gets a list of the registration definitions. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str + :param filter: The filter query parameter to filter managed services resources by. + :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RegistrationDefinitionList or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managedservices.models.RegistrationDefinitionList] @@ -302,7 +305,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -320,6 +323,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') request = self._client.get(url, query_parameters, header_parameters) else: diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py index a4aab1875126..0c731eb25f4f 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py @@ -8,6 +8,7 @@ try: from ._models_py3 import Authorization + from ._models_py3 import EligibleApprover from ._models_py3 import EligibleAuthorization from ._models_py3 import ErrorDefinition from ._models_py3 import ErrorResponse @@ -27,8 +28,10 @@ from ._models_py3 import RegistrationDefinition from ._models_py3 import RegistrationDefinitionList from ._models_py3 import RegistrationDefinitionProperties + from ._models_py3 import SystemData except (SyntaxError, ImportError): from ._models import Authorization # type: ignore + from ._models import EligibleApprover # type: ignore from ._models import EligibleAuthorization # type: ignore from ._models import ErrorDefinition # type: ignore from ._models import ErrorResponse # type: ignore @@ -48,6 +51,7 @@ from ._models import RegistrationDefinition # type: ignore from ._models import RegistrationDefinitionList # type: ignore from ._models import RegistrationDefinitionProperties # type: ignore + from ._models import SystemData # type: ignore from ._managed_services_client_enums import ( MultiFactorAuthProvider, @@ -56,6 +60,7 @@ __all__ = [ 'Authorization', + 'EligibleApprover', 'EligibleAuthorization', 'ErrorDefinition', 'ErrorResponse', @@ -75,6 +80,7 @@ 'RegistrationDefinition', 'RegistrationDefinitionList', 'RegistrationDefinitionProperties', + 'SystemData', 'MultiFactorAuthProvider', 'ProvisioningState', ] diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py index 92e26e80ee8a..70564f8fc51c 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py @@ -27,14 +27,14 @@ def __getattr__(cls, name): class MultiFactorAuthProvider(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """MFA provider. + """The multi-factor authorization provider to be used for just-in-time access requests. """ AZURE = "Azure" NONE = "None" class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Current state of the registration definition. + """The current provisioning state of the registration definition. """ NOT_SPECIFIED = "NotSpecified" diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py index 1f44f236a6ac..80aa016af8c9 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py @@ -11,23 +11,21 @@ class Authorization(msrest.serialization.Model): - """Authorization tuple containing principal Id (of user/service principal/security group) and role definition id. + """The Azure Active Directory principal identifier and Azure built-in role that describes the access the principal will receive on the delegated resource in the managed tenant. 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. + :param principal_id: Required. The identifier of the Azure Active Directory principal. :type principal_id: str - :param principal_id_display_name: Display name of the principal Id. + :param principal_id_display_name: The display name of the Azure Active Directory principal. :type principal_id_display_name: 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. + :param role_definition_id: Required. The identifier of the Azure built-in role that defines the + permissions that the Azure Active Directory principal will have on the projected scope. :type role_definition_id: str :param delegated_role_definition_ids: The delegatedRoleDefinitionIds field is required when the roleDefinitionId refers to the User Access Administrator Role. It is the list of role definition ids which define all the permissions that the user in the authorization can assign - to other security groups/service principals/users. + to other principals. :type delegated_role_definition_ids: list[str] """ @@ -54,21 +52,48 @@ def __init__( self.delegated_role_definition_ids = kwargs.get('delegated_role_definition_ids', None) +class EligibleApprover(msrest.serialization.Model): + """Defines the Azure Active Directory principal that can approve any just-in-time access requests by the principal defined in the EligibleAuthorization. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active Directory principal. + :type principal_id_display_name: str + """ + + _validation = { + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EligibleApprover, self).__init__(**kwargs) + self.principal_id = kwargs['principal_id'] + self.principal_id_display_name = kwargs.get('principal_id_display_name', None) + + class EligibleAuthorization(msrest.serialization.Model): - """Eligible authorization tuple containing principle Id (of user/service principal/security group), role definition id, and the just-in-time access setting. + """The Azure Active Directory principal identifier, Azure built-in role, and just-in-time access policy that describes the just-in-time access the principal will receive on the delegated resource in the managed tenant. 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 delegated permissions to the projected subscription. + :param principal_id: Required. The identifier of the Azure Active Directory principal. :type principal_id: str - :param principal_id_display_name: Display name of the principal Id. + :param principal_id_display_name: The display name of the Azure Active Directory principal. :type principal_id_display_name: str - :param role_definition_id: Required. The role definition identifier. This role will delegate - all the permissions that the security group/service principal/user must have on the projected - subscription. This role cannot be an owner role. + :param role_definition_id: Required. The identifier of the Azure built-in role that defines the + permissions that the Azure Active Directory principal will have on the projected scope. :type role_definition_id: str - :param just_in_time_access_policy: Just-in-time access policy setting. + :param just_in_time_access_policy: The just-in-time access policy setting. :type just_in_time_access_policy: ~azure.mgmt.managedservices.models.JustInTimeAccessPolicy """ @@ -96,15 +121,15 @@ def __init__( class ErrorDefinition(msrest.serialization.Model): - """Error response indicates Azure Resource Manager is not able to process the incoming request. The reason is provided in the error message. + """The error response indicating why the incoming request wasn’t able to be processed. All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. + :param code: Required. The error code. :type code: str - :param message: Required. Error message indicating why the operation failed. + :param message: Required. The error message indicating why the operation failed. :type message: str - :param details: Internal error details. + :param details: The internal error details. :type details: list[~azure.mgmt.managedservices.models.ErrorDefinition] """ @@ -153,13 +178,17 @@ class JustInTimeAccessPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param multi_factor_auth_provider: Required. MFA provider. Possible values include: "Azure", + :param multi_factor_auth_provider: Required. The multi-factor authorization provider to be used + for just-in-time access requests. Possible values include: "Azure", "None". Default value: "None". :type multi_factor_auth_provider: str or ~azure.mgmt.managedservices.models.MultiFactorAuthProvider - :param maximum_activation_duration: Maximum access duration in ISO 8601 format. The default - value is "PT8H". + :param maximum_activation_duration: The maximum access duration in ISO 8601 format for + just-in-time access requests. :type maximum_activation_duration: ~datetime.timedelta + :param managed_by_tenant_approvers: The list of managedByTenant approvers for the eligible + authorization. + :type managed_by_tenant_approvers: list[~azure.mgmt.managedservices.models.EligibleApprover] """ _validation = { @@ -169,6 +198,7 @@ class JustInTimeAccessPolicy(msrest.serialization.Model): _attribute_map = { 'multi_factor_auth_provider': {'key': 'multiFactorAuthProvider', 'type': 'str'}, 'maximum_activation_duration': {'key': 'maximumActivationDuration', 'type': 'duration'}, + 'managed_by_tenant_approvers': {'key': 'managedByTenantApprovers', 'type': '[EligibleApprover]'}, } def __init__( @@ -176,8 +206,9 @@ def __init__( **kwargs ): super(JustInTimeAccessPolicy, self).__init__(**kwargs) - self.multi_factor_auth_provider = kwargs['multi_factor_auth_provider'] - self.maximum_activation_duration = kwargs.get('maximum_activation_duration', None) + self.multi_factor_auth_provider = kwargs.get('multi_factor_auth_provider', "None") + self.maximum_activation_duration = kwargs.get('maximum_activation_duration', "PT8H") + self.managed_by_tenant_approvers = kwargs.get('managed_by_tenant_approvers', None) class MarketplaceRegistrationDefinition(msrest.serialization.Model): @@ -185,16 +216,17 @@ class MarketplaceRegistrationDefinition(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of a marketplace registration definition. + :param properties: The properties of the marketplace registration definition. :type properties: ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionProperties - :param plan: Plan details for the managed services. + :param plan: The details for the Managed Services offer’s plan in Azure Marketplace. :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the marketplace registration definition. + :ivar id: The fully qualified path of the marketplace registration definition. :vartype id: str - :ivar type: Type of the resource. + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/marketplaceRegistrationDefinitions). :vartype type: str - :ivar name: Name of the marketplace registration definition. + :ivar name: The name of the marketplace registration definition. :vartype name: str """ @@ -225,13 +257,13 @@ def __init__( class MarketplaceRegistrationDefinitionList(msrest.serialization.Model): - """List of marketplace registration definitions. + """The list of marketplace registration definitions. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of marketplace registration definitions. + :ivar value: The list of marketplace registration definitions. :vartype value: list[~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition] - :ivar next_link: Link to next page of marketplace registration definitions. + :ivar next_link: The link to the next page of marketplace registration definitions. :vartype next_link: str """ @@ -255,18 +287,19 @@ def __init__( class MarketplaceRegistrationDefinitionProperties(msrest.serialization.Model): - """Properties of a marketplace registration definition. + """The properties of the marketplace registration definition. All required parameters must be populated in order to send to Azure. - :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :param managed_by_tenant_id: Required. The identifier of the managedBy tenant. :type managed_by_tenant_id: str - :param authorizations: Required. Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. + :param authorizations: Required. The collection of authorization objects describing the access + Azure Active Directory principals in the managedBy tenant will receive on the delegated + resource in the managed tenant. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] - :param eligible_authorizations: Eligible PIM authorization tuple containing principal id of the - user/security group or service principal, id of the built-in role, and just-in-time access - policy setting. + :param eligible_authorizations: The collection of eligible authorization objects describing the + just-in-time access Azure Active Directory principals in the managedBy tenant will receive on + the delegated resource in the managed tenant. :type eligible_authorizations: list[~azure.mgmt.managedservices.models.EligibleAuthorization] :param offer_display_name: The marketplace offer display name. :type offer_display_name: str @@ -304,11 +337,11 @@ def __init__( class Operation(msrest.serialization.Model): - """Object that describes a single Microsoft.ManagedServices operation. + """The object that describes a single Microsoft.ManagedServices operation. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Operation name: {provider}/{resource}/{operation}. + :ivar name: The operation name with the format: {provider}/{resource}/{operation}. :vartype name: str :ivar display: The object that represents the operation. :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay @@ -336,14 +369,13 @@ def __init__( class OperationDisplay(msrest.serialization.Model): """The object that represents the operation. - :param provider: Service provider: Microsoft.ManagedServices. + :param provider: The service provider. :type provider: str - :param resource: Resource on which the operation is performed: Registration definition, - registration assignment etc. + :param resource: The resource on which the operation is performed. :type resource: str - :param operation: Operation type: Read, write, delete, etc. + :param operation: The operation type. :type operation: str - :param description: Description of the operation. + :param description: The description of the operation. :type description: str """ @@ -366,11 +398,11 @@ def __init__( class OperationList(msrest.serialization.Model): - """List of the operations. + """The list of the operations. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of Microsoft.ManagedServices operations. + :ivar value: The list of Microsoft.ManagedServices operations. :vartype value: list[~azure.mgmt.managedservices.models.Operation] """ @@ -391,17 +423,17 @@ def __init__( class Plan(msrest.serialization.Model): - """Plan details for the managed services. + """The details for the Managed Services offer’s plan in Azure Marketplace. All required parameters must be populated in order to send to Azure. - :param name: Required. The plan name. + :param name: Required. Azure Marketplace plan name. :type name: str - :param publisher: Required. The publisher ID. + :param publisher: Required. Azure Marketplace publisher ID. :type publisher: str - :param product: Required. The product code. + :param product: Required. Azure Marketplace product code. :type product: str - :param version: Required. The plan's version. + :param version: Required. Azure Marketplace plan's version. :type version: str """ @@ -431,24 +463,27 @@ def __init__( class RegistrationAssignment(msrest.serialization.Model): - """Registration assignment. + """The registration assignment. Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of a registration assignment. + :param properties: The properties of a registration assignment. :type properties: ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties :ivar id: The fully qualified path of the registration assignment. :vartype id: str - :ivar type: Type of the resource. + :ivar type: The type of the Azure resource (Microsoft.ManagedServices/registrationAssignments). :vartype type: str - :ivar name: Name of the registration assignment. + :ivar name: The name of the registration assignment. :vartype name: str + :ivar system_data: The metadata for the registration assignment resource. + :vartype system_data: ~azure.mgmt.managedservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -456,6 +491,7 @@ class RegistrationAssignment(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -467,16 +503,17 @@ def __init__( self.id = None self.type = None self.name = None + self.system_data = None class RegistrationAssignmentList(msrest.serialization.Model): - """List of registration assignments. + """The list of registration assignments. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of registration assignments. + :ivar value: The list of registration assignments. :vartype value: list[~azure.mgmt.managedservices.models.RegistrationAssignment] - :ivar next_link: Link to next page of registration assignments. + :ivar next_link: The link to the next page of registration assignments. :vartype next_link: str """ @@ -500,20 +537,21 @@ def __init__( class RegistrationAssignmentProperties(msrest.serialization.Model): - """Properties of a registration assignment. + """The properties of the registration assignment. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param registration_definition_id: Required. Fully qualified path of the registration + :param registration_definition_id: Required. The fully qualified path of the registration definition. :type registration_definition_id: str - :ivar provisioning_state: Current state of the registration assignment. Possible values - include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", - "Deleted", "Canceled", "Failed", "Succeeded", "Updating". + :ivar provisioning_state: The current provisioning state of the registration assignment. + Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", + "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Updating". :vartype provisioning_state: str or ~azure.mgmt.managedservices.models.ProvisioningState - :ivar registration_definition: Registration definition inside registration assignment. + :ivar registration_definition: The registration definition associated with the registration + assignment. :vartype registration_definition: ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition """ @@ -541,27 +579,31 @@ def __init__( class RegistrationAssignmentPropertiesRegistrationDefinition(msrest.serialization.Model): - """Registration definition inside registration assignment. + """The registration definition associated with the registration assignment. Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of registration definition inside registration assignment. + :param properties: The properties of the registration definition associated with the + registration assignment. :type properties: ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties - :param plan: Plan details for the managed services. + :param plan: The details for the Managed Services offer’s plan in Azure Marketplace. :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. + :ivar id: The fully qualified path of the registration definition. :vartype id: str - :ivar type: Type of the resource (Microsoft.ManagedServices/registrationDefinitions). + :ivar type: The type of the Azure resource (Microsoft.ManagedServices/registrationDefinitions). :vartype type: str - :ivar name: Name of the registration definition. + :ivar name: The name of the registration definition. :vartype name: str + :ivar system_data: The metadata for the registration definition resource. + :vartype system_data: ~azure.mgmt.managedservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -570,6 +612,7 @@ class RegistrationAssignmentPropertiesRegistrationDefinition(msrest.serializatio 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -582,33 +625,35 @@ def __init__( self.id = None self.type = None self.name = None + self.system_data = None class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(msrest.serialization.Model): - """Properties of registration definition inside registration assignment. + """The properties of the registration definition associated with the registration assignment. - :param description: Description of the registration definition. + :param description: The description of the registration definition. :type description: str - :param authorizations: Authorization tuple containing principal id of the user/security group - or service principal and id of the build-in role. + :param authorizations: The collection of authorization objects describing the access Azure + Active Directory principals in the managedBy tenant will receive on the delegated resource in + the managed tenant. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] - :param eligible_authorizations: Eligible PIM authorization tuple containing principal id of the - user/security group or service principal, id of the built-in role, and just-in-time access - policy setting. + :param eligible_authorizations: The collection of eligible authorization objects describing the + just-in-time access Azure Active Directory principals in the managedBy tenant will receive on + the delegated resource in the managed tenant. :type eligible_authorizations: list[~azure.mgmt.managedservices.models.EligibleAuthorization] - :param registration_definition_name: Name of the registration definition. + :param registration_definition_name: The name of the registration definition. :type registration_definition_name: str - :param provisioning_state: Current state of the registration definition. Possible values - include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", - "Deleted", "Canceled", "Failed", "Succeeded", "Updating". + :param provisioning_state: The current provisioning state of the registration definition. + Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", + "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Updating". :type provisioning_state: str or ~azure.mgmt.managedservices.models.ProvisioningState - :param managee_tenant_id: Id of the home tenant. + :param managee_tenant_id: The identifier of the managed tenant. :type managee_tenant_id: str - :param managee_tenant_name: Name of the home tenant. + :param managee_tenant_name: The name of the managed tenant. :type managee_tenant_name: str - :param managed_by_tenant_id: Id of the managedBy tenant. + :param managed_by_tenant_id: The identifier of the managedBy tenant. :type managed_by_tenant_id: str - :param managed_by_tenant_name: Name of the managedBy tenant. + :param managed_by_tenant_name: The name of the managedBy tenant. :type managed_by_tenant_name: str """ @@ -641,26 +686,29 @@ def __init__( class RegistrationDefinition(msrest.serialization.Model): - """Registration definition. + """The registration definition. Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of a registration definition. + :param properties: The properties of a registration definition. :type properties: ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties - :param plan: Plan details for the managed services. + :param plan: The details for the Managed Services offer’s plan in Azure Marketplace. :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. + :ivar id: The fully qualified path of the registration definition. :vartype id: str - :ivar type: Type of the resource. + :ivar type: The type of the Azure resource (Microsoft.ManagedServices/registrationDefinitions). :vartype type: str - :ivar name: Name of the registration definition. + :ivar name: The name of the registration definition. :vartype name: str + :ivar system_data: The metadata for the registration assignment resource. + :vartype system_data: ~azure.mgmt.managedservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -669,6 +717,7 @@ class RegistrationDefinition(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -681,16 +730,17 @@ def __init__( self.id = None self.type = None self.name = None + self.system_data = None class RegistrationDefinitionList(msrest.serialization.Model): - """List of registration definitions. + """The list of registration definitions. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of registration definitions. + :ivar value: The list of registration definitions. :vartype value: list[~azure.mgmt.managedservices.models.RegistrationDefinition] - :ivar next_link: Link to next page of registration definitions. + :ivar next_link: The link to the next page of registration definitions. :vartype next_link: str """ @@ -714,30 +764,35 @@ def __init__( class RegistrationDefinitionProperties(msrest.serialization.Model): - """Properties of a registration definition. + """The properties of a registration definition. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param description: Description of the registration definition. + :param description: The description of the registration definition. :type description: str - :param authorizations: Required. Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. + :param authorizations: Required. The collection of authorization objects describing the access + Azure Active Directory principals in the managedBy tenant will receive on the delegated + resource in the managed tenant. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] - :param eligible_authorizations: Eligible PIM authorization tuple containing principal id of the - user/security group or service principal, id of the built-in role, and just-in-time access - policy setting. + :param eligible_authorizations: The collection of eligible authorization objects describing the + just-in-time access Azure Active Directory principals in the managedBy tenant will receive on + the delegated resource in the managed tenant. :type eligible_authorizations: list[~azure.mgmt.managedservices.models.EligibleAuthorization] - :param registration_definition_name: Name of the registration definition. + :param registration_definition_name: The name of the registration definition. :type registration_definition_name: str - :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :param managed_by_tenant_id: Required. The identifier of the managedBy tenant. :type managed_by_tenant_id: str - :ivar provisioning_state: Current state of the registration definition. Possible values - include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", - "Deleted", "Canceled", "Failed", "Succeeded", "Updating". + :ivar provisioning_state: The current provisioning state of the registration definition. + Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", + "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Updating". :vartype provisioning_state: str or ~azure.mgmt.managedservices.models.ProvisioningState - :ivar managed_by_tenant_name: Name of the managedBy tenant. + :ivar managee_tenant_id: The identifier of the managed tenant. + :vartype managee_tenant_id: str + :ivar managee_tenant_name: The name of the managed tenant. + :vartype managee_tenant_name: str + :ivar managed_by_tenant_name: The name of the managedBy tenant. :vartype managed_by_tenant_name: str """ @@ -745,6 +800,8 @@ class RegistrationDefinitionProperties(msrest.serialization.Model): 'authorizations': {'required': True}, 'managed_by_tenant_id': {'required': True}, 'provisioning_state': {'readonly': True}, + 'managee_tenant_id': {'readonly': True}, + 'managee_tenant_name': {'readonly': True}, 'managed_by_tenant_name': {'readonly': True}, } @@ -755,6 +812,8 @@ class RegistrationDefinitionProperties(msrest.serialization.Model): 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, } @@ -769,4 +828,47 @@ def __init__( self.registration_definition_name = kwargs.get('registration_definition_name', None) self.managed_by_tenant_id = kwargs['managed_by_tenant_id'] self.provisioning_state = None + self.managee_tenant_id = None + self.managee_tenant_name = None self.managed_by_tenant_name = None + + +class SystemData(msrest.serialization.Model): + """The metadata associated with an Azure resource. + + :param created_by: A string identifier for the identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :type created_by_type: str + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: A string identifier for the identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :type last_modified_by_type: str + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py index 22899f6fd634..dd7330ca91b9 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py @@ -16,23 +16,21 @@ class Authorization(msrest.serialization.Model): - """Authorization tuple containing principal Id (of user/service principal/security group) and role definition id. + """The Azure Active Directory principal identifier and Azure built-in role that describes the access the principal will receive on the delegated resource in the managed tenant. 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. + :param principal_id: Required. The identifier of the Azure Active Directory principal. :type principal_id: str - :param principal_id_display_name: Display name of the principal Id. + :param principal_id_display_name: The display name of the Azure Active Directory principal. :type principal_id_display_name: 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. + :param role_definition_id: Required. The identifier of the Azure built-in role that defines the + permissions that the Azure Active Directory principal will have on the projected scope. :type role_definition_id: str :param delegated_role_definition_ids: The delegatedRoleDefinitionIds field is required when the roleDefinitionId refers to the User Access Administrator Role. It is the list of role definition ids which define all the permissions that the user in the authorization can assign - to other security groups/service principals/users. + to other principals. :type delegated_role_definition_ids: list[str] """ @@ -64,21 +62,51 @@ def __init__( self.delegated_role_definition_ids = delegated_role_definition_ids +class EligibleApprover(msrest.serialization.Model): + """Defines the Azure Active Directory principal that can approve any just-in-time access requests by the principal defined in the EligibleAuthorization. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active Directory principal. + :type principal_id_display_name: str + """ + + _validation = { + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + } + + def __init__( + self, + *, + principal_id: str, + principal_id_display_name: Optional[str] = None, + **kwargs + ): + super(EligibleApprover, self).__init__(**kwargs) + self.principal_id = principal_id + self.principal_id_display_name = principal_id_display_name + + class EligibleAuthorization(msrest.serialization.Model): - """Eligible authorization tuple containing principle Id (of user/service principal/security group), role definition id, and the just-in-time access setting. + """The Azure Active Directory principal identifier, Azure built-in role, and just-in-time access policy that describes the just-in-time access the principal will receive on the delegated resource in the managed tenant. 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 delegated permissions to the projected subscription. + :param principal_id: Required. The identifier of the Azure Active Directory principal. :type principal_id: str - :param principal_id_display_name: Display name of the principal Id. + :param principal_id_display_name: The display name of the Azure Active Directory principal. :type principal_id_display_name: str - :param role_definition_id: Required. The role definition identifier. This role will delegate - all the permissions that the security group/service principal/user must have on the projected - subscription. This role cannot be an owner role. + :param role_definition_id: Required. The identifier of the Azure built-in role that defines the + permissions that the Azure Active Directory principal will have on the projected scope. :type role_definition_id: str - :param just_in_time_access_policy: Just-in-time access policy setting. + :param just_in_time_access_policy: The just-in-time access policy setting. :type just_in_time_access_policy: ~azure.mgmt.managedservices.models.JustInTimeAccessPolicy """ @@ -111,15 +139,15 @@ def __init__( class ErrorDefinition(msrest.serialization.Model): - """Error response indicates Azure Resource Manager is not able to process the incoming request. The reason is provided in the error message. + """The error response indicating why the incoming request wasn’t able to be processed. All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. + :param code: Required. The error code. :type code: str - :param message: Required. Error message indicating why the operation failed. + :param message: Required. The error message indicating why the operation failed. :type message: str - :param details: Internal error details. + :param details: The internal error details. :type details: list[~azure.mgmt.managedservices.models.ErrorDefinition] """ @@ -174,13 +202,17 @@ class JustInTimeAccessPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param multi_factor_auth_provider: Required. MFA provider. Possible values include: "Azure", + :param multi_factor_auth_provider: Required. The multi-factor authorization provider to be used + for just-in-time access requests. Possible values include: "Azure", "None". Default value: "None". :type multi_factor_auth_provider: str or ~azure.mgmt.managedservices.models.MultiFactorAuthProvider - :param maximum_activation_duration: Maximum access duration in ISO 8601 format. The default - value is "PT8H". + :param maximum_activation_duration: The maximum access duration in ISO 8601 format for + just-in-time access requests. :type maximum_activation_duration: ~datetime.timedelta + :param managed_by_tenant_approvers: The list of managedByTenant approvers for the eligible + authorization. + :type managed_by_tenant_approvers: list[~azure.mgmt.managedservices.models.EligibleApprover] """ _validation = { @@ -190,18 +222,21 @@ class JustInTimeAccessPolicy(msrest.serialization.Model): _attribute_map = { 'multi_factor_auth_provider': {'key': 'multiFactorAuthProvider', 'type': 'str'}, 'maximum_activation_duration': {'key': 'maximumActivationDuration', 'type': 'duration'}, + 'managed_by_tenant_approvers': {'key': 'managedByTenantApprovers', 'type': '[EligibleApprover]'}, } def __init__( self, *, - multi_factor_auth_provider: Union[str, "MultiFactorAuthProvider"], - maximum_activation_duration: Optional[datetime.timedelta] = None, + multi_factor_auth_provider: Union[str, "MultiFactorAuthProvider"] = "None", + maximum_activation_duration: Optional[datetime.timedelta] = "PT8H", + managed_by_tenant_approvers: Optional[List["EligibleApprover"]] = None, **kwargs ): super(JustInTimeAccessPolicy, self).__init__(**kwargs) self.multi_factor_auth_provider = multi_factor_auth_provider self.maximum_activation_duration = maximum_activation_duration + self.managed_by_tenant_approvers = managed_by_tenant_approvers class MarketplaceRegistrationDefinition(msrest.serialization.Model): @@ -209,16 +244,17 @@ class MarketplaceRegistrationDefinition(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of a marketplace registration definition. + :param properties: The properties of the marketplace registration definition. :type properties: ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionProperties - :param plan: Plan details for the managed services. + :param plan: The details for the Managed Services offer’s plan in Azure Marketplace. :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the marketplace registration definition. + :ivar id: The fully qualified path of the marketplace registration definition. :vartype id: str - :ivar type: Type of the resource. + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/marketplaceRegistrationDefinitions). :vartype type: str - :ivar name: Name of the marketplace registration definition. + :ivar name: The name of the marketplace registration definition. :vartype name: str """ @@ -252,13 +288,13 @@ def __init__( class MarketplaceRegistrationDefinitionList(msrest.serialization.Model): - """List of marketplace registration definitions. + """The list of marketplace registration definitions. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of marketplace registration definitions. + :ivar value: The list of marketplace registration definitions. :vartype value: list[~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition] - :ivar next_link: Link to next page of marketplace registration definitions. + :ivar next_link: The link to the next page of marketplace registration definitions. :vartype next_link: str """ @@ -282,18 +318,19 @@ def __init__( class MarketplaceRegistrationDefinitionProperties(msrest.serialization.Model): - """Properties of a marketplace registration definition. + """The properties of the marketplace registration definition. All required parameters must be populated in order to send to Azure. - :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :param managed_by_tenant_id: Required. The identifier of the managedBy tenant. :type managed_by_tenant_id: str - :param authorizations: Required. Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. + :param authorizations: Required. The collection of authorization objects describing the access + Azure Active Directory principals in the managedBy tenant will receive on the delegated + resource in the managed tenant. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] - :param eligible_authorizations: Eligible PIM authorization tuple containing principal id of the - user/security group or service principal, id of the built-in role, and just-in-time access - policy setting. + :param eligible_authorizations: The collection of eligible authorization objects describing the + just-in-time access Azure Active Directory principals in the managedBy tenant will receive on + the delegated resource in the managed tenant. :type eligible_authorizations: list[~azure.mgmt.managedservices.models.EligibleAuthorization] :param offer_display_name: The marketplace offer display name. :type offer_display_name: str @@ -338,11 +375,11 @@ def __init__( class Operation(msrest.serialization.Model): - """Object that describes a single Microsoft.ManagedServices operation. + """The object that describes a single Microsoft.ManagedServices operation. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Operation name: {provider}/{resource}/{operation}. + :ivar name: The operation name with the format: {provider}/{resource}/{operation}. :vartype name: str :ivar display: The object that represents the operation. :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay @@ -370,14 +407,13 @@ def __init__( class OperationDisplay(msrest.serialization.Model): """The object that represents the operation. - :param provider: Service provider: Microsoft.ManagedServices. + :param provider: The service provider. :type provider: str - :param resource: Resource on which the operation is performed: Registration definition, - registration assignment etc. + :param resource: The resource on which the operation is performed. :type resource: str - :param operation: Operation type: Read, write, delete, etc. + :param operation: The operation type. :type operation: str - :param description: Description of the operation. + :param description: The description of the operation. :type description: str """ @@ -405,11 +441,11 @@ def __init__( class OperationList(msrest.serialization.Model): - """List of the operations. + """The list of the operations. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of Microsoft.ManagedServices operations. + :ivar value: The list of Microsoft.ManagedServices operations. :vartype value: list[~azure.mgmt.managedservices.models.Operation] """ @@ -430,17 +466,17 @@ def __init__( class Plan(msrest.serialization.Model): - """Plan details for the managed services. + """The details for the Managed Services offer’s plan in Azure Marketplace. All required parameters must be populated in order to send to Azure. - :param name: Required. The plan name. + :param name: Required. Azure Marketplace plan name. :type name: str - :param publisher: Required. The publisher ID. + :param publisher: Required. Azure Marketplace publisher ID. :type publisher: str - :param product: Required. The product code. + :param product: Required. Azure Marketplace product code. :type product: str - :param version: Required. The plan's version. + :param version: Required. Azure Marketplace plan's version. :type version: str """ @@ -475,24 +511,27 @@ def __init__( class RegistrationAssignment(msrest.serialization.Model): - """Registration assignment. + """The registration assignment. Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of a registration assignment. + :param properties: The properties of a registration assignment. :type properties: ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties :ivar id: The fully qualified path of the registration assignment. :vartype id: str - :ivar type: Type of the resource. + :ivar type: The type of the Azure resource (Microsoft.ManagedServices/registrationAssignments). :vartype type: str - :ivar name: Name of the registration assignment. + :ivar name: The name of the registration assignment. :vartype name: str + :ivar system_data: The metadata for the registration assignment resource. + :vartype system_data: ~azure.mgmt.managedservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -500,6 +539,7 @@ class RegistrationAssignment(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -513,16 +553,17 @@ def __init__( self.id = None self.type = None self.name = None + self.system_data = None class RegistrationAssignmentList(msrest.serialization.Model): - """List of registration assignments. + """The list of registration assignments. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of registration assignments. + :ivar value: The list of registration assignments. :vartype value: list[~azure.mgmt.managedservices.models.RegistrationAssignment] - :ivar next_link: Link to next page of registration assignments. + :ivar next_link: The link to the next page of registration assignments. :vartype next_link: str """ @@ -546,20 +587,21 @@ def __init__( class RegistrationAssignmentProperties(msrest.serialization.Model): - """Properties of a registration assignment. + """The properties of the registration assignment. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param registration_definition_id: Required. Fully qualified path of the registration + :param registration_definition_id: Required. The fully qualified path of the registration definition. :type registration_definition_id: str - :ivar provisioning_state: Current state of the registration assignment. Possible values - include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", - "Deleted", "Canceled", "Failed", "Succeeded", "Updating". + :ivar provisioning_state: The current provisioning state of the registration assignment. + Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", + "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Updating". :vartype provisioning_state: str or ~azure.mgmt.managedservices.models.ProvisioningState - :ivar registration_definition: Registration definition inside registration assignment. + :ivar registration_definition: The registration definition associated with the registration + assignment. :vartype registration_definition: ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition """ @@ -589,27 +631,31 @@ def __init__( class RegistrationAssignmentPropertiesRegistrationDefinition(msrest.serialization.Model): - """Registration definition inside registration assignment. + """The registration definition associated with the registration assignment. Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of registration definition inside registration assignment. + :param properties: The properties of the registration definition associated with the + registration assignment. :type properties: ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties - :param plan: Plan details for the managed services. + :param plan: The details for the Managed Services offer’s plan in Azure Marketplace. :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. + :ivar id: The fully qualified path of the registration definition. :vartype id: str - :ivar type: Type of the resource (Microsoft.ManagedServices/registrationDefinitions). + :ivar type: The type of the Azure resource (Microsoft.ManagedServices/registrationDefinitions). :vartype type: str - :ivar name: Name of the registration definition. + :ivar name: The name of the registration definition. :vartype name: str + :ivar system_data: The metadata for the registration definition resource. + :vartype system_data: ~azure.mgmt.managedservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -618,6 +664,7 @@ class RegistrationAssignmentPropertiesRegistrationDefinition(msrest.serializatio 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -633,33 +680,35 @@ def __init__( self.id = None self.type = None self.name = None + self.system_data = None class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(msrest.serialization.Model): - """Properties of registration definition inside registration assignment. + """The properties of the registration definition associated with the registration assignment. - :param description: Description of the registration definition. + :param description: The description of the registration definition. :type description: str - :param authorizations: Authorization tuple containing principal id of the user/security group - or service principal and id of the build-in role. + :param authorizations: The collection of authorization objects describing the access Azure + Active Directory principals in the managedBy tenant will receive on the delegated resource in + the managed tenant. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] - :param eligible_authorizations: Eligible PIM authorization tuple containing principal id of the - user/security group or service principal, id of the built-in role, and just-in-time access - policy setting. + :param eligible_authorizations: The collection of eligible authorization objects describing the + just-in-time access Azure Active Directory principals in the managedBy tenant will receive on + the delegated resource in the managed tenant. :type eligible_authorizations: list[~azure.mgmt.managedservices.models.EligibleAuthorization] - :param registration_definition_name: Name of the registration definition. + :param registration_definition_name: The name of the registration definition. :type registration_definition_name: str - :param provisioning_state: Current state of the registration definition. Possible values - include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", - "Deleted", "Canceled", "Failed", "Succeeded", "Updating". + :param provisioning_state: The current provisioning state of the registration definition. + Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", + "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Updating". :type provisioning_state: str or ~azure.mgmt.managedservices.models.ProvisioningState - :param managee_tenant_id: Id of the home tenant. + :param managee_tenant_id: The identifier of the managed tenant. :type managee_tenant_id: str - :param managee_tenant_name: Name of the home tenant. + :param managee_tenant_name: The name of the managed tenant. :type managee_tenant_name: str - :param managed_by_tenant_id: Id of the managedBy tenant. + :param managed_by_tenant_id: The identifier of the managedBy tenant. :type managed_by_tenant_id: str - :param managed_by_tenant_name: Name of the managedBy tenant. + :param managed_by_tenant_name: The name of the managedBy tenant. :type managed_by_tenant_name: str """ @@ -702,26 +751,29 @@ def __init__( class RegistrationDefinition(msrest.serialization.Model): - """Registration definition. + """The registration definition. Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties of a registration definition. + :param properties: The properties of a registration definition. :type properties: ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties - :param plan: Plan details for the managed services. + :param plan: The details for the Managed Services offer’s plan in Azure Marketplace. :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. + :ivar id: The fully qualified path of the registration definition. :vartype id: str - :ivar type: Type of the resource. + :ivar type: The type of the Azure resource (Microsoft.ManagedServices/registrationDefinitions). :vartype type: str - :ivar name: Name of the registration definition. + :ivar name: The name of the registration definition. :vartype name: str + :ivar system_data: The metadata for the registration assignment resource. + :vartype system_data: ~azure.mgmt.managedservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -730,6 +782,7 @@ class RegistrationDefinition(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -745,16 +798,17 @@ def __init__( self.id = None self.type = None self.name = None + self.system_data = None class RegistrationDefinitionList(msrest.serialization.Model): - """List of registration definitions. + """The list of registration definitions. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of registration definitions. + :ivar value: The list of registration definitions. :vartype value: list[~azure.mgmt.managedservices.models.RegistrationDefinition] - :ivar next_link: Link to next page of registration definitions. + :ivar next_link: The link to the next page of registration definitions. :vartype next_link: str """ @@ -778,30 +832,35 @@ def __init__( class RegistrationDefinitionProperties(msrest.serialization.Model): - """Properties of a registration definition. + """The properties of a registration definition. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param description: Description of the registration definition. + :param description: The description of the registration definition. :type description: str - :param authorizations: Required. Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. + :param authorizations: Required. The collection of authorization objects describing the access + Azure Active Directory principals in the managedBy tenant will receive on the delegated + resource in the managed tenant. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] - :param eligible_authorizations: Eligible PIM authorization tuple containing principal id of the - user/security group or service principal, id of the built-in role, and just-in-time access - policy setting. + :param eligible_authorizations: The collection of eligible authorization objects describing the + just-in-time access Azure Active Directory principals in the managedBy tenant will receive on + the delegated resource in the managed tenant. :type eligible_authorizations: list[~azure.mgmt.managedservices.models.EligibleAuthorization] - :param registration_definition_name: Name of the registration definition. + :param registration_definition_name: The name of the registration definition. :type registration_definition_name: str - :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :param managed_by_tenant_id: Required. The identifier of the managedBy tenant. :type managed_by_tenant_id: str - :ivar provisioning_state: Current state of the registration definition. Possible values - include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", - "Deleted", "Canceled", "Failed", "Succeeded", "Updating". + :ivar provisioning_state: The current provisioning state of the registration definition. + Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", + "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Updating". :vartype provisioning_state: str or ~azure.mgmt.managedservices.models.ProvisioningState - :ivar managed_by_tenant_name: Name of the managedBy tenant. + :ivar managee_tenant_id: The identifier of the managed tenant. + :vartype managee_tenant_id: str + :ivar managee_tenant_name: The name of the managed tenant. + :vartype managee_tenant_name: str + :ivar managed_by_tenant_name: The name of the managedBy tenant. :vartype managed_by_tenant_name: str """ @@ -809,6 +868,8 @@ class RegistrationDefinitionProperties(msrest.serialization.Model): 'authorizations': {'required': True}, 'managed_by_tenant_id': {'required': True}, 'provisioning_state': {'readonly': True}, + 'managee_tenant_id': {'readonly': True}, + 'managee_tenant_name': {'readonly': True}, 'managed_by_tenant_name': {'readonly': True}, } @@ -819,6 +880,8 @@ class RegistrationDefinitionProperties(msrest.serialization.Model): 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, } @@ -839,4 +902,54 @@ def __init__( self.registration_definition_name = registration_definition_name self.managed_by_tenant_id = managed_by_tenant_id self.provisioning_state = None + self.managee_tenant_id = None + self.managee_tenant_name = None self.managed_by_tenant_name = None + + +class SystemData(msrest.serialization.Model): + """The metadata associated with an Azure resource. + + :param created_by: A string identifier for the identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :type created_by_type: str + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: A string identifier for the identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :type last_modified_by_type: str + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[str] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[str] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py index 870efd9901ce..58533b45af57 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py @@ -54,10 +54,9 @@ def list( # type: (...) -> Iterable["_models.MarketplaceRegistrationDefinitionList"] """Gets a list of the marketplace registration definitions for the marketplace identifier. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param filter: The filter query parameter. Might be used to filter marketplace registration - definition by plan identifier, publisher, version etc. + :param filter: The filter query parameter to filter managed services resources by. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response) @@ -69,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -131,9 +130,9 @@ def get( # type: (...) -> "_models.MarketplaceRegistrationDefinition" """Get the marketplace registration definition for the marketplace identifier. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param marketplace_identifier: Market place identifier. Expected Formats - + :param marketplace_identifier: The Azure Marketplace identifier. Expected formats: {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). :type marketplace_identifier: str @@ -147,7 +146,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py index 2ef4e26064c1..0c4d8b4bced6 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py @@ -53,8 +53,7 @@ def list( # type: (...) -> Iterable["_models.MarketplaceRegistrationDefinitionList"] """Gets a list of the marketplace registration definitions for the marketplace identifier. - :param filter: The filter query parameter. Might be used to filter marketplace registration - definition by plan identifier, publisher, version etc. + :param filter: The filter query parameter to filter managed services resources by. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response) @@ -66,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -123,7 +122,7 @@ def get( # type: (...) -> "_models.MarketplaceRegistrationDefinition" """Get the marketplace registration definition for the marketplace identifier. - :param marketplace_identifier: Market place identifier. Expected Formats - + :param marketplace_identifier: The Azure Marketplace identifier. Expected formats: {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). :type marketplace_identifier: str @@ -137,7 +136,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py index 416060e95be0..f8281a327033 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py @@ -61,7 +61,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py index 2acf9413aeba..c4942325ac30 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py @@ -55,14 +55,14 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.RegistrationAssignment" - """Gets the details of specified registration assignment. + """Gets the details of the specified registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration assignment. + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str - :param expand_registration_definition: Tells whether to return registration definition details - also along with registration assignment details. + :param expand_registration_definition: The flag indicating whether to return the registration + definition details along with the registration assignment details. :type expand_registration_definition: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: RegistrationAssignment, or the result of cls(response) @@ -74,7 +74,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -124,7 +124,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -166,14 +166,14 @@ def begin_delete( # type: (...) -> LROPoller[None] """Deletes the specified registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration assignment. + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -234,7 +234,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -289,16 +289,16 @@ def begin_create_or_update( # type: (...) -> LROPoller["_models.RegistrationAssignment"] """Creates or updates a registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration assignment. + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str :param request_body: The parameters required to create new registration assignment. :type request_body: ~azure.mgmt.managedservices.models.RegistrationAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RegistrationAssignment or the result of cls(response) @@ -354,16 +354,19 @@ def list( self, scope, # type: str expand_registration_definition=None, # type: Optional[bool] + filter=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> Iterable["_models.RegistrationAssignmentList"] """Gets a list of the registration assignments. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param expand_registration_definition: Tells whether to return registration definition details - also along with registration assignment details. + :param expand_registration_definition: The flag indicating whether to return the registration + definition details along with the registration assignment details. :type expand_registration_definition: bool + :param filter: The filter query parameter to filter managed services resources by. + :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RegistrationAssignmentList or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managedservices.models.RegistrationAssignmentList] @@ -374,7 +377,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -394,6 +397,8 @@ def prepare_request(next_link=None): if expand_registration_definition is not None: query_parameters['$expandRegistrationDefinition'] = self._serialize.query("expand_registration_definition", expand_registration_definition, 'bool') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') request = self._client.get(url, query_parameters, header_parameters) else: diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py index 4b644ac1a0c2..f98e4383c18a 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py @@ -56,9 +56,9 @@ def get( # type: (...) -> "_models.RegistrationDefinition" """Gets the registration definition details. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_definition_id: Guid of the registration definition. + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RegistrationDefinition, or the result of cls(response) @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -115,9 +115,9 @@ def delete( # type: (...) -> None """Deletes the registration definition. - :param registration_definition_id: Guid of the registration definition. + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -129,7 +129,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL @@ -175,7 +175,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -230,16 +230,16 @@ def begin_create_or_update( # type: (...) -> LROPoller["_models.RegistrationDefinition"] """Creates or updates a registration definition. - :param registration_definition_id: Guid of the registration definition. + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param request_body: The parameters required to create new registration definition. + :param request_body: The parameters required to create a new registration definition. :type request_body: ~azure.mgmt.managedservices.models.RegistrationDefinition :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RegistrationDefinition or the result of cls(response) @@ -294,13 +294,16 @@ def get_long_running_output(pipeline_response): def list( self, scope, # type: str + filter=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> Iterable["_models.RegistrationDefinitionList"] """Gets a list of the registration definitions. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str + :param filter: The filter query parameter to filter managed services resources by. + :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RegistrationDefinitionList or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managedservices.models.RegistrationDefinitionList] @@ -311,7 +314,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -329,6 +332,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') request = self._client.get(url, query_parameters, header_parameters) else: