diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/_meta.json b/sdk/devtestlabs/azure-mgmt-devtestlabs/_meta.json new file mode 100644 index 000000000000..5682b409eee4 --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "6ba37b7279bbd0d69042743246780cc3af9257b9", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/devtestlabs/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/devtestlabs/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py index 292b59cccf08..c265c7a55e23 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import DevTestLabsClientConfiguration from .operations import ProviderOperationsOperations @@ -176,6 +177,24 @@ def __init__( self.virtual_networks = VirtualNetworksOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_metadata.json b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_metadata.json new file mode 100644 index 000000000000..53114cdb5f74 --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_metadata.json @@ -0,0 +1,127 @@ +{ + "chosen_version": "2018-09-15", + "total_api_version_list": ["2018-09-15"], + "client": { + "name": "DevTestLabsClient", + "filename": "_dev_test_labs_client", + "description": "The DevTest Labs Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DevTestLabsClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DevTestLabsClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "provider_operations": "ProviderOperationsOperations", + "labs": "LabsOperations", + "operations": "Operations", + "global_schedules": "GlobalSchedulesOperations", + "artifact_sources": "ArtifactSourcesOperations", + "arm_templates": "ArmTemplatesOperations", + "artifacts": "ArtifactsOperations", + "costs": "CostsOperations", + "custom_images": "CustomImagesOperations", + "formulas": "FormulasOperations", + "gallery_images": "GalleryImagesOperations", + "notification_channels": "NotificationChannelsOperations", + "policy_sets": "PolicySetsOperations", + "policies": "PoliciesOperations", + "schedules": "SchedulesOperations", + "service_runners": "ServiceRunnersOperations", + "users": "UsersOperations", + "disks": "DisksOperations", + "environments": "EnvironmentsOperations", + "secrets": "SecretsOperations", + "service_fabrics": "ServiceFabricsOperations", + "service_fabric_schedules": "ServiceFabricSchedulesOperations", + "virtual_machines": "VirtualMachinesOperations", + "virtual_machine_schedules": "VirtualMachineSchedulesOperations", + "virtual_networks": "VirtualNetworksOperations" + } +} \ No newline at end of file diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_version.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_version.py index b77ac9246082..c47f66669f1b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_version.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_dev_test_labs_client.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_dev_test_labs_client.py index e54b913aa64a..a77a05ae49d2 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_dev_test_labs_client.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_dev_test_labs_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -173,6 +174,23 @@ def __init__( self.virtual_networks = VirtualNetworksOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_arm_templates_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_arm_templates_operations.py index 55850951470a..0b96fa48d0b6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_arm_templates_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_arm_templates_operations.py @@ -50,7 +50,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ArmTemplateList"]: """List azure resource manager templates in a given artifact source. @@ -147,7 +147,7 @@ async def get( artifact_source_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ArmTemplate": """Get azure resource manager template. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifact_sources_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifact_sources_operations.py index aad52c573238..706655a132a8 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifact_sources_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifact_sources_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ArtifactSourceList"]: """List artifact sources in a given lab. @@ -142,7 +142,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ArtifactSource": """Get artifact source. @@ -209,7 +209,7 @@ async def create_or_update( lab_name: str, name: str, artifact_source: "_models.ArtifactSource", - **kwargs + **kwargs: Any ) -> "_models.ArtifactSource": """Create or replace an existing artifact source. @@ -282,7 +282,7 @@ async def delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete artifact source. @@ -341,8 +341,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - artifact_source: "_models.ArtifactSourceFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.ArtifactSource": """Allows modifying tags of artifact sources. All other properties will be ignored. @@ -352,8 +352,8 @@ async def update( :type lab_name: str :param name: The name of the artifact source. :type name: str - :param artifact_source: Properties of an artifact source. - :type artifact_source: ~azure.mgmt.devtestlabs.models.ArtifactSourceFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: ArtifactSource, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.ArtifactSource @@ -364,6 +364,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _artifact_source = _models.ArtifactSourceFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -388,7 +390,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(artifact_source, 'ArtifactSourceFragment') + body_content = self._serialize.body(_artifact_source, 'ArtifactSourceFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifacts_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifacts_operations.py index 68bed6059bde..ba060c9cb985 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifacts_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_artifacts_operations.py @@ -50,7 +50,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ArtifactList"]: """List artifacts in a given artifact source. @@ -147,7 +147,7 @@ async def get( artifact_source_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Artifact": """Get artifact. @@ -218,7 +218,7 @@ async def generate_arm_template( artifact_source_name: str, name: str, generate_arm_template_request: "_models.GenerateArmTemplateRequest", - **kwargs + **kwargs: Any ) -> "_models.ArmTemplateInfo": """Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_costs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_costs_operations.py index 86a66ff8307c..7ff102b73e83 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_costs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_costs_operations.py @@ -46,7 +46,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.LabCost": """Get cost. @@ -113,7 +113,7 @@ async def create_or_update( lab_name: str, name: str, lab_cost: "_models.LabCost", - **kwargs + **kwargs: Any ) -> "_models.LabCost": """Create or replace an existing cost. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_custom_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_custom_images_operations.py index 67cad5bcf5b0..08897d74e75a 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_custom_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_custom_images_operations.py @@ -51,7 +51,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CustomImageList"]: """List custom images in a given lab. @@ -144,7 +144,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.CustomImage": """Get custom image. @@ -211,7 +211,7 @@ async def _create_or_update_initial( lab_name: str, name: str, custom_image: "_models.CustomImage", - **kwargs + **kwargs: Any ) -> "_models.CustomImage": cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomImage"] error_map = { @@ -270,7 +270,7 @@ async def begin_create_or_update( lab_name: str, name: str, custom_image: "_models.CustomImage", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CustomImage"]: """Create or replace an existing custom image. This operation can take a while to complete. @@ -284,8 +284,8 @@ async def begin_create_or_update( :type custom_image: ~azure.mgmt.devtestlabs.models.CustomImage :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: True for ARMPolling, False for no polling, or a - polling object for 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 CustomImage or the result of cls(response) @@ -345,7 +345,7 @@ async def _delete_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -391,7 +391,7 @@ async def begin_delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete custom image. This operation can take a while to complete. @@ -403,8 +403,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -460,8 +460,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - custom_image: "_models.CustomImageFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.CustomImage": """Allows modifying tags of custom images. All other properties will be ignored. @@ -471,8 +471,8 @@ async def update( :type lab_name: str :param name: The name of the custom image. :type name: str - :param custom_image: A custom image. - :type custom_image: ~azure.mgmt.devtestlabs.models.CustomImageFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomImage, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.CustomImage @@ -483,6 +483,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _custom_image = _models.CustomImageFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -507,7 +509,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(custom_image, 'CustomImageFragment') + body_content = self._serialize.body(_custom_image, 'CustomImageFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_disks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_disks_operations.py index 02cb285e430a..d046c0c0433e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_disks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_disks_operations.py @@ -52,7 +52,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DiskList"]: """List disks in a given user profile. @@ -149,7 +149,7 @@ async def get( user_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Disk": """Get disk. @@ -220,7 +220,7 @@ async def _create_or_update_initial( user_name: str, name: str, disk: "_models.Disk", - **kwargs + **kwargs: Any ) -> "_models.Disk": cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] error_map = { @@ -281,7 +281,7 @@ async def begin_create_or_update( user_name: str, name: str, disk: "_models.Disk", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Disk"]: """Create or replace an existing disk. This operation can take a while to complete. @@ -297,8 +297,8 @@ async def begin_create_or_update( :type disk: ~azure.mgmt.devtestlabs.models.Disk :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: True for ARMPolling, False for no polling, or a - polling object for 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 Disk or the result of cls(response) @@ -361,7 +361,7 @@ async def _delete_initial( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -409,7 +409,7 @@ async def begin_delete( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete disk. This operation can take a while to complete. @@ -423,8 +423,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -483,8 +483,8 @@ async def update( lab_name: str, user_name: str, name: str, - disk: "_models.DiskFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Disk": """Allows modifying tags of disks. All other properties will be ignored. @@ -496,8 +496,8 @@ async def update( :type user_name: str :param name: The name of the disk. :type name: str - :param disk: A Disk. - :type disk: ~azure.mgmt.devtestlabs.models.DiskFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Disk, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Disk @@ -508,6 +508,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _disk = _models.DiskFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -533,7 +535,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(disk, 'DiskFragment') + body_content = self._serialize.body(_disk, 'DiskFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -558,7 +560,7 @@ async def _attach_initial( user_name: str, name: str, leased_by_lab_vm_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -614,7 +616,7 @@ async def begin_attach( user_name: str, name: str, leased_by_lab_vm_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. @@ -632,8 +634,8 @@ async def begin_attach( :type leased_by_lab_vm_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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -694,7 +696,7 @@ async def _detach_initial( user_name: str, name: str, leased_by_lab_vm_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -750,7 +752,7 @@ async def begin_detach( user_name: str, name: str, leased_by_lab_vm_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. @@ -767,8 +769,8 @@ async def begin_detach( :type leased_by_lab_vm_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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_environments_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_environments_operations.py index 06d7746ab9ef..abe3445ddfc3 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_environments_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_environments_operations.py @@ -52,7 +52,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DtlEnvironmentList"]: """List environments in a given user profile. @@ -149,7 +149,7 @@ async def get( user_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.DtlEnvironment": """Get environment. @@ -220,7 +220,7 @@ async def _create_or_update_initial( user_name: str, name: str, dtl_environment: "_models.DtlEnvironment", - **kwargs + **kwargs: Any ) -> "_models.DtlEnvironment": cls = kwargs.pop('cls', None) # type: ClsType["_models.DtlEnvironment"] error_map = { @@ -281,7 +281,7 @@ async def begin_create_or_update( user_name: str, name: str, dtl_environment: "_models.DtlEnvironment", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DtlEnvironment"]: """Create or replace an existing environment. This operation can take a while to complete. @@ -297,8 +297,8 @@ async def begin_create_or_update( :type dtl_environment: ~azure.mgmt.devtestlabs.models.DtlEnvironment :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: True for ARMPolling, False for no polling, or a - polling object for 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 DtlEnvironment or the result of cls(response) @@ -361,7 +361,7 @@ async def _delete_initial( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -409,7 +409,7 @@ async def begin_delete( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete environment. This operation can take a while to complete. @@ -423,8 +423,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -483,8 +483,8 @@ async def update( lab_name: str, user_name: str, name: str, - dtl_environment: "_models.DtlEnvironmentFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.DtlEnvironment": """Allows modifying tags of environments. All other properties will be ignored. @@ -496,8 +496,8 @@ async def update( :type user_name: str :param name: The name of the environment. :type name: str - :param dtl_environment: An environment, which is essentially an ARM template deployment. - :type dtl_environment: ~azure.mgmt.devtestlabs.models.DtlEnvironmentFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: DtlEnvironment, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.DtlEnvironment @@ -508,6 +508,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _dtl_environment = _models.DtlEnvironmentFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -533,7 +535,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(dtl_environment, 'DtlEnvironmentFragment') + body_content = self._serialize.body(_dtl_environment, 'DtlEnvironmentFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_formulas_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_formulas_operations.py index 2753d74534f9..7dde4dff5a03 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_formulas_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_formulas_operations.py @@ -51,7 +51,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.FormulaList"]: """List formulas in a given lab. @@ -144,7 +144,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Formula": """Get formula. @@ -211,7 +211,7 @@ async def _create_or_update_initial( lab_name: str, name: str, formula: "_models.Formula", - **kwargs + **kwargs: Any ) -> "_models.Formula": cls = kwargs.pop('cls', None) # type: ClsType["_models.Formula"] error_map = { @@ -270,7 +270,7 @@ async def begin_create_or_update( lab_name: str, name: str, formula: "_models.Formula", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Formula"]: """Create or replace an existing formula. This operation can take a while to complete. @@ -284,8 +284,8 @@ async def begin_create_or_update( :type formula: ~azure.mgmt.devtestlabs.models.Formula :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: True for ARMPolling, False for no polling, or a - polling object for 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 Formula or the result of cls(response) @@ -345,7 +345,7 @@ async def delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete formula. @@ -404,8 +404,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - formula: "_models.FormulaFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Formula": """Allows modifying tags of formulas. All other properties will be ignored. @@ -415,8 +415,8 @@ async def update( :type lab_name: str :param name: The name of the formula. :type name: str - :param formula: A formula for creating a VM, specifying an image base and other parameters. - :type formula: ~azure.mgmt.devtestlabs.models.FormulaFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Formula, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Formula @@ -427,6 +427,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _formula = _models.FormulaFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -451,7 +453,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(formula, 'FormulaFragment') + body_content = self._serialize.body(_formula, 'FormulaFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_gallery_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_gallery_images_operations.py index 3b30158b713e..19cef0fd1929 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_gallery_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_gallery_images_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GalleryImageList"]: """List gallery images in a given lab. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_global_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_global_schedules_operations.py index a0bb8f037e5d..5902c1fb1017 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_global_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_global_schedules_operations.py @@ -49,7 +49,7 @@ def list_by_subscription( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduleList"]: """List schedules in a subscription. @@ -137,7 +137,7 @@ def list_by_resource_group( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduleList"]: """List schedules in a resource group. @@ -226,7 +226,7 @@ async def get( resource_group_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Get schedule. @@ -289,7 +289,7 @@ async def create_or_update( resource_group_name: str, name: str, schedule: "_models.Schedule", - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Create or replace an existing schedule. @@ -358,7 +358,7 @@ async def delete( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete schedule. @@ -413,8 +413,8 @@ async def update( self, resource_group_name: str, name: str, - schedule: "_models.ScheduleFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Schedule": """Allows modifying tags of schedules. All other properties will be ignored. @@ -422,8 +422,8 @@ async def update( :type resource_group_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -434,6 +434,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -457,7 +459,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -479,7 +481,7 @@ async def _execute_initial( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -523,7 +525,7 @@ async def begin_execute( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Execute a schedule. This operation can take a while to complete. @@ -533,8 +535,8 @@ async def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -589,7 +591,7 @@ async def _retarget_initial( name: str, current_resource_id: Optional[str] = None, target_resource_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -642,7 +644,7 @@ async def begin_retarget( name: str, current_resource_id: Optional[str] = None, target_resource_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Updates a schedule's target resource Id. This operation can take a while to complete. @@ -658,8 +660,8 @@ async def begin_retarget( :type target_resource_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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_labs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_labs_operations.py index a705d8403efc..90cbde39b10c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_labs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_labs_operations.py @@ -50,7 +50,7 @@ def list_by_subscription( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LabList"]: """List labs in a subscription. @@ -138,7 +138,7 @@ def list_by_resource_group( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LabList"]: """List labs in a resource group. @@ -227,7 +227,7 @@ async def get( resource_group_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Lab": """Get lab. @@ -290,7 +290,7 @@ async def _create_or_update_initial( resource_group_name: str, name: str, lab: "_models.Lab", - **kwargs + **kwargs: Any ) -> "_models.Lab": cls = kwargs.pop('cls', None) # type: ClsType["_models.Lab"] error_map = { @@ -347,7 +347,7 @@ async def begin_create_or_update( resource_group_name: str, name: str, lab: "_models.Lab", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Lab"]: """Create or replace an existing lab. This operation can take a while to complete. @@ -359,8 +359,8 @@ async def begin_create_or_update( :type lab: ~azure.mgmt.devtestlabs.models.Lab :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: True for ARMPolling, False for no polling, or a - polling object for 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 Lab or the result of cls(response) @@ -417,7 +417,7 @@ async def _delete_initial( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -461,7 +461,7 @@ async def begin_delete( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete lab. This operation can take a while to complete. @@ -471,8 +471,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -525,8 +525,8 @@ async def update( self, resource_group_name: str, name: str, - lab: "_models.LabFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Lab": """Allows modifying tags of labs. All other properties will be ignored. @@ -534,8 +534,8 @@ async def update( :type resource_group_name: str :param name: The name of the lab. :type name: str - :param lab: A lab. - :type lab: ~azure.mgmt.devtestlabs.models.LabFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Lab, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Lab @@ -546,6 +546,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _lab = _models.LabFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -569,7 +571,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(lab, 'LabFragment') + body_content = self._serialize.body(_lab, 'LabFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -591,7 +593,7 @@ async def _claim_any_vm_initial( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -635,7 +637,7 @@ async def begin_claim_any_vm( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Claim a random claimable virtual machine in the lab. This operation can take a while to complete. @@ -646,8 +648,8 @@ async def begin_claim_any_vm( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -701,7 +703,7 @@ async def _create_environment_initial( resource_group_name: str, name: str, lab_virtual_machine_creation_parameter: "_models.LabVirtualMachineCreationParameter", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -751,7 +753,7 @@ async def begin_create_environment( resource_group_name: str, name: str, lab_virtual_machine_creation_parameter: "_models.LabVirtualMachineCreationParameter", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Create virtual machines in a lab. This operation can take a while to complete. @@ -763,8 +765,8 @@ async def begin_create_environment( :type lab_virtual_machine_creation_parameter: ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -820,7 +822,7 @@ async def _export_resource_usage_initial( name: str, blob_storage_absolute_sas_uri: Optional[str] = None, usage_start_date: Optional[datetime.datetime] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -873,7 +875,7 @@ async def begin_export_resource_usage( name: str, blob_storage_absolute_sas_uri: Optional[str] = None, usage_start_date: Optional[datetime.datetime] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Exports the lab resource usage into a storage account This operation can take a while to complete. @@ -890,8 +892,8 @@ async def begin_export_resource_usage( :type usage_start_date: ~datetime.datetime :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -947,7 +949,7 @@ async def generate_upload_uri( resource_group_name: str, name: str, blob_name: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GenerateUploadUriResponse": """Generate a URI for uploading custom disk images to a Lab. @@ -1016,7 +1018,7 @@ async def _import_virtual_machine_initial( name: str, source_virtual_machine_resource_id: Optional[str] = None, destination_virtual_machine_name: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1069,7 +1071,7 @@ async def begin_import_virtual_machine( name: str, source_virtual_machine_resource_id: Optional[str] = None, destination_virtual_machine_name: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Import a virtual machine into a different lab. This operation can take a while to complete. @@ -1085,8 +1087,8 @@ async def begin_import_virtual_machine( :type destination_virtual_machine_name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1141,7 +1143,7 @@ def list_vhds( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LabVhdList"]: """List disk images available for custom image creation. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_notification_channels_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_notification_channels_operations.py index be21cb67a36a..07dea932d1ce 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_notification_channels_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_notification_channels_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NotificationChannelList"]: """List notification channels in a given lab. @@ -142,7 +142,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.NotificationChannel": """Get notification channel. @@ -209,7 +209,7 @@ async def create_or_update( lab_name: str, name: str, notification_channel: "_models.NotificationChannel", - **kwargs + **kwargs: Any ) -> "_models.NotificationChannel": """Create or replace an existing notification channel. @@ -282,7 +282,7 @@ async def delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete notification channel. @@ -341,8 +341,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - notification_channel: "_models.NotificationChannelFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.NotificationChannel": """Allows modifying tags of notification channels. All other properties will be ignored. @@ -352,8 +352,8 @@ async def update( :type lab_name: str :param name: The name of the notification channel. :type name: str - :param notification_channel: A notification. - :type notification_channel: ~azure.mgmt.devtestlabs.models.NotificationChannelFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: NotificationChannel, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.NotificationChannel @@ -364,6 +364,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _notification_channel = _models.NotificationChannelFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -388,7 +390,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(notification_channel, 'NotificationChannelFragment') + body_content = self._serialize.body(_notification_channel, 'NotificationChannelFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -413,7 +415,7 @@ async def notify( name: str, event_name: Optional[Union[str, "_models.NotificationChannelEventType"]] = None, json_payload: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Send notification to provided channel. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_operations.py index cbefde857aa9..5c816490010d 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_operations.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -44,7 +44,7 @@ async def get( self, location_name: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.OperationResult": """Get operation. @@ -86,11 +86,15 @@ async def get( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('OperationResult', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('OperationResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('OperationResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policies_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policies_operations.py index 86b3eeb89d69..525af3786483 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policies_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policies_operations.py @@ -50,7 +50,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PolicyList"]: """List policies in a given policy set. @@ -147,7 +147,7 @@ async def get( policy_set_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Policy": """Get policy. @@ -218,7 +218,7 @@ async def create_or_update( policy_set_name: str, name: str, policy: "_models.Policy", - **kwargs + **kwargs: Any ) -> "_models.Policy": """Create or replace an existing policy. @@ -295,7 +295,7 @@ async def delete( lab_name: str, policy_set_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete policy. @@ -358,8 +358,8 @@ async def update( lab_name: str, policy_set_name: str, name: str, - policy: "_models.PolicyFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Policy": """Allows modifying tags of policies. All other properties will be ignored. @@ -371,8 +371,8 @@ async def update( :type policy_set_name: str :param name: The name of the policy. :type name: str - :param policy: A Policy. - :type policy: ~azure.mgmt.devtestlabs.models.PolicyFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Policy, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Policy @@ -383,6 +383,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _policy = _models.PolicyFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -408,7 +410,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(policy, 'PolicyFragment') + body_content = self._serialize.body(_policy, 'PolicyFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policy_sets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policy_sets_operations.py index 1fc63e77dfc8..eabfb9565b82 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policy_sets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_policy_sets_operations.py @@ -46,7 +46,7 @@ async def evaluate_policies( lab_name: str, name: str, policies: Optional[List["_models.EvaluatePoliciesProperties"]] = None, - **kwargs + **kwargs: Any ) -> "_models.EvaluatePoliciesResponse": """Evaluates lab policy. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_provider_operations_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_provider_operations_operations.py index abea508b6cca..f67927d0d387 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_provider_operations_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_provider_operations_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProviderOperationResult"]: """Result of the request to list REST API operations. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_schedules_operations.py index 5f2c79aea70d..b812811ad0e8 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_schedules_operations.py @@ -51,7 +51,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduleList"]: """List schedules in a given lab. @@ -144,7 +144,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Get schedule. @@ -211,7 +211,7 @@ async def create_or_update( lab_name: str, name: str, schedule: "_models.Schedule", - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Create or replace an existing schedule. @@ -284,7 +284,7 @@ async def delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete schedule. @@ -343,8 +343,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - schedule: "_models.ScheduleFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Schedule": """Allows modifying tags of schedules. All other properties will be ignored. @@ -354,8 +354,8 @@ async def update( :type lab_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -366,6 +366,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -390,7 +392,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -413,7 +415,7 @@ async def _execute_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -459,7 +461,7 @@ async def begin_execute( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Execute a schedule. This operation can take a while to complete. @@ -471,8 +473,8 @@ async def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -528,7 +530,7 @@ def list_applicable( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduleList"]: """Lists all applicable schedules. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_secrets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_secrets_operations.py index 880c4f793811..6eb1b0f7d227 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_secrets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_secrets_operations.py @@ -52,7 +52,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SecretList"]: """List secrets in a given user profile. @@ -149,7 +149,7 @@ async def get( user_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Secret": """Get secret. @@ -220,7 +220,7 @@ async def _create_or_update_initial( user_name: str, name: str, secret: "_models.Secret", - **kwargs + **kwargs: Any ) -> "_models.Secret": cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] error_map = { @@ -281,7 +281,7 @@ async def begin_create_or_update( user_name: str, name: str, secret: "_models.Secret", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Secret"]: """Create or replace an existing secret. This operation can take a while to complete. @@ -297,8 +297,8 @@ async def begin_create_or_update( :type secret: ~azure.mgmt.devtestlabs.models.Secret :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: True for ARMPolling, False for no polling, or a - polling object for 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 Secret or the result of cls(response) @@ -361,7 +361,7 @@ async def delete( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete secret. @@ -425,8 +425,7 @@ async def update( user_name: str, name: str, tags: Optional[Dict[str, str]] = None, - value: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Secret": """Allows modifying tags of secrets. All other properties will be ignored. @@ -440,8 +439,6 @@ async def update( :type name: str :param tags: The tags of the resource. :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Secret, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Secret @@ -453,7 +450,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - _secret = _models.SecretFragment(tags=tags, value=value) + _secret = _models.SecretFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabric_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabric_schedules_operations.py index 1ed377f38b03..5f143796fa02 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabric_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabric_schedules_operations.py @@ -53,7 +53,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduleList"]: """List schedules in a given service fabric. @@ -154,7 +154,7 @@ async def get( service_fabric_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Get schedule. @@ -229,7 +229,7 @@ async def create_or_update( service_fabric_name: str, name: str, schedule: "_models.Schedule", - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Create or replace an existing schedule. @@ -310,7 +310,7 @@ async def delete( user_name: str, service_fabric_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete schedule. @@ -377,8 +377,8 @@ async def update( user_name: str, service_fabric_name: str, name: str, - schedule: "_models.ScheduleFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Schedule": """Allows modifying tags of schedules. All other properties will be ignored. @@ -392,8 +392,8 @@ async def update( :type service_fabric_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -404,6 +404,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -430,7 +432,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -455,7 +457,7 @@ async def _execute_initial( user_name: str, service_fabric_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -505,7 +507,7 @@ async def begin_execute( user_name: str, service_fabric_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Execute a schedule. This operation can take a while to complete. @@ -521,8 +523,8 @@ async def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabrics_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabrics_operations.py index 4fa19e38d269..66cbaba9f02f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabrics_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabrics_operations.py @@ -52,7 +52,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServiceFabricList"]: """List service fabrics in a given user profile. @@ -149,7 +149,7 @@ async def get( user_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ServiceFabric": """Get service fabric. @@ -220,7 +220,7 @@ async def _create_or_update_initial( user_name: str, name: str, service_fabric: "_models.ServiceFabric", - **kwargs + **kwargs: Any ) -> "_models.ServiceFabric": cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceFabric"] error_map = { @@ -281,7 +281,7 @@ async def begin_create_or_update( user_name: str, name: str, service_fabric: "_models.ServiceFabric", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ServiceFabric"]: """Create or replace an existing service fabric. This operation can take a while to complete. @@ -297,8 +297,8 @@ async def begin_create_or_update( :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric :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: True for ARMPolling, False for no polling, or a - polling object for 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 ServiceFabric or the result of cls(response) @@ -361,7 +361,7 @@ async def _delete_initial( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -409,7 +409,7 @@ async def begin_delete( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete service fabric. This operation can take a while to complete. @@ -423,8 +423,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -483,8 +483,8 @@ async def update( lab_name: str, user_name: str, name: str, - service_fabric: "_models.ServiceFabricFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.ServiceFabric": """Allows modifying tags of service fabrics. All other properties will be ignored. @@ -496,8 +496,8 @@ async def update( :type user_name: str :param name: The name of the service fabric. :type name: str - :param service_fabric: A Service Fabric. - :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabricFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceFabric, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.ServiceFabric @@ -508,6 +508,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _service_fabric = _models.ServiceFabricFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -533,7 +535,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(service_fabric, 'ServiceFabricFragment') + body_content = self._serialize.body(_service_fabric, 'ServiceFabricFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -557,7 +559,7 @@ async def list_applicable_schedules( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.ApplicableSchedule": """Lists the applicable start/stop schedules, if any. @@ -623,7 +625,7 @@ async def _start_initial( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -671,7 +673,7 @@ async def begin_start( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Start a service fabric. This operation can take a while to complete. @@ -685,8 +687,8 @@ async def begin_start( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -745,7 +747,7 @@ async def _stop_initial( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -793,7 +795,7 @@ async def begin_stop( lab_name: str, user_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Stop a service fabric This operation can take a while to complete. @@ -807,8 +809,8 @@ async def begin_stop( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_runners_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_runners_operations.py index e43f7fa34dac..5cdb21f4962e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_runners_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_runners_operations.py @@ -45,7 +45,7 @@ async def get( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.ServiceRunner": """Get service runner. @@ -108,7 +108,7 @@ async def create_or_update( lab_name: str, name: str, service_runner: "_models.ServiceRunner", - **kwargs + **kwargs: Any ) -> "_models.ServiceRunner": """Create or replace an existing service runner. @@ -181,7 +181,7 @@ async def delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete service runner. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_users_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_users_operations.py index 1705b9b08454..d08df1b310b8 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_users_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_users_operations.py @@ -51,7 +51,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UserList"]: """List user profiles in a given lab. @@ -144,7 +144,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.User": """Get user profile. @@ -211,7 +211,7 @@ async def _create_or_update_initial( lab_name: str, name: str, user: "_models.User", - **kwargs + **kwargs: Any ) -> "_models.User": cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] error_map = { @@ -270,7 +270,7 @@ async def begin_create_or_update( lab_name: str, name: str, user: "_models.User", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.User"]: """Create or replace an existing user profile. This operation can take a while to complete. @@ -284,8 +284,8 @@ async def begin_create_or_update( :type user: ~azure.mgmt.devtestlabs.models.User :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: True for ARMPolling, False for no polling, or a - polling object for 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 User or the result of cls(response) @@ -345,7 +345,7 @@ async def _delete_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -391,7 +391,7 @@ async def begin_delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete user profile. This operation can take a while to complete. @@ -403,8 +403,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -460,8 +460,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - user: "_models.UserFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.User": """Allows modifying tags of user profiles. All other properties will be ignored. @@ -471,8 +471,8 @@ async def update( :type lab_name: str :param name: The name of the user profile. :type name: str - :param user: Profile of a lab user. - :type user: ~azure.mgmt.devtestlabs.models.UserFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.User @@ -483,6 +483,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _user = _models.UserFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -507,7 +509,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(user, 'UserFragment') + body_content = self._serialize.body(_user, 'UserFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machine_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machine_schedules_operations.py index dab93e3eb69b..096e14fdd234 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machine_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machine_schedules_operations.py @@ -52,7 +52,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduleList"]: """List schedules in a given virtual machine. @@ -149,7 +149,7 @@ async def get( virtual_machine_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Get schedule. @@ -220,7 +220,7 @@ async def create_or_update( virtual_machine_name: str, name: str, schedule: "_models.Schedule", - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Create or replace an existing schedule. @@ -297,7 +297,7 @@ async def delete( lab_name: str, virtual_machine_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete schedule. @@ -360,8 +360,8 @@ async def update( lab_name: str, virtual_machine_name: str, name: str, - schedule: "_models.ScheduleFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.Schedule": """Allows modifying tags of schedules. All other properties will be ignored. @@ -373,8 +373,8 @@ async def update( :type virtual_machine_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -385,6 +385,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -410,7 +412,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -434,7 +436,7 @@ async def _execute_initial( lab_name: str, virtual_machine_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -482,7 +484,7 @@ async def begin_execute( lab_name: str, virtual_machine_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Execute a schedule. This operation can take a while to complete. @@ -496,8 +498,8 @@ async def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machines_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machines_operations.py index b83ef07fa68b..c7981c2c3723 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machines_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_machines_operations.py @@ -51,7 +51,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LabVirtualMachineList"]: """List virtual machines in a given lab. @@ -145,7 +145,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.LabVirtualMachine": """Get virtual machine. @@ -213,7 +213,7 @@ async def _create_or_update_initial( lab_name: str, name: str, lab_virtual_machine: "_models.LabVirtualMachine", - **kwargs + **kwargs: Any ) -> "_models.LabVirtualMachine": cls = kwargs.pop('cls', None) # type: ClsType["_models.LabVirtualMachine"] error_map = { @@ -272,7 +272,7 @@ async def begin_create_or_update( lab_name: str, name: str, lab_virtual_machine: "_models.LabVirtualMachine", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.LabVirtualMachine"]: """Create or replace an existing virtual machine. This operation can take a while to complete. @@ -286,8 +286,8 @@ async def begin_create_or_update( :type lab_virtual_machine: ~azure.mgmt.devtestlabs.models.LabVirtualMachine :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: True for ARMPolling, False for no polling, or a - polling object for 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 LabVirtualMachine or the result of cls(response) @@ -347,7 +347,7 @@ async def _delete_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -393,7 +393,7 @@ async def begin_delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete virtual machine. This operation can take a while to complete. @@ -405,8 +405,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -462,8 +462,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - lab_virtual_machine: "_models.LabVirtualMachineFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.LabVirtualMachine": """Allows modifying tags of virtual machines. All other properties will be ignored. @@ -473,8 +473,8 @@ async def update( :type lab_name: str :param name: The name of the virtual machine. :type name: str - :param lab_virtual_machine: A virtual machine. - :type lab_virtual_machine: ~azure.mgmt.devtestlabs.models.LabVirtualMachineFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: LabVirtualMachine, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.LabVirtualMachine @@ -485,6 +485,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _lab_virtual_machine = _models.LabVirtualMachineFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -509,7 +511,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(lab_virtual_machine, 'LabVirtualMachineFragment') + body_content = self._serialize.body(_lab_virtual_machine, 'LabVirtualMachineFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -533,7 +535,7 @@ async def _add_data_disk_initial( lab_name: str, name: str, data_disk_properties: "_models.DataDiskProperties", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -585,7 +587,7 @@ async def begin_add_data_disk( lab_name: str, name: str, data_disk_properties: "_models.DataDiskProperties", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Attach a new or existing data disk to virtual machine. This operation can take a while to complete. @@ -601,8 +603,8 @@ async def begin_add_data_disk( :type data_disk_properties: ~azure.mgmt.devtestlabs.models.DataDiskProperties :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -660,7 +662,7 @@ async def _apply_artifacts_initial( lab_name: str, name: str, artifacts: Optional[List["_models.ArtifactInstallProperties"]] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -714,7 +716,7 @@ async def begin_apply_artifacts( lab_name: str, name: str, artifacts: Optional[List["_models.ArtifactInstallProperties"]] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Apply artifacts to virtual machine. This operation can take a while to complete. @@ -728,8 +730,8 @@ async def begin_apply_artifacts( :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -786,7 +788,7 @@ async def _claim_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -832,7 +834,7 @@ async def begin_claim( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Take ownership of an existing virtual machine This operation can take a while to complete. @@ -844,8 +846,8 @@ async def begin_claim( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -902,7 +904,7 @@ async def _detach_data_disk_initial( lab_name: str, name: str, existing_lab_disk_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -956,7 +958,7 @@ async def begin_detach_data_disk( lab_name: str, name: str, existing_lab_disk_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Detach the specified disk from the virtual machine. This operation can take a while to complete. @@ -971,8 +973,8 @@ async def begin_detach_data_disk( :type existing_lab_disk_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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1029,7 +1031,7 @@ async def get_rdp_file_contents( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.RdpConnection": """Gets a string that represents the contents of the RDP file for the virtual machine. @@ -1091,7 +1093,7 @@ async def list_applicable_schedules( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.ApplicableSchedule": """Lists the applicable start/stop schedules, if any. @@ -1153,7 +1155,7 @@ async def _redeploy_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1199,7 +1201,7 @@ async def begin_redeploy( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Redeploy a virtual machine This operation can take a while to complete. @@ -1211,8 +1213,8 @@ async def begin_redeploy( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1269,7 +1271,7 @@ async def _resize_initial( lab_name: str, name: str, size: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1323,7 +1325,7 @@ async def begin_resize( lab_name: str, name: str, size: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Resize Virtual Machine. This operation can take a while to complete. @@ -1337,8 +1339,8 @@ async def begin_resize( :type size: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1395,7 +1397,7 @@ async def _restart_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1441,7 +1443,7 @@ async def begin_restart( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Restart a virtual machine. This operation can take a while to complete. @@ -1453,8 +1455,8 @@ async def begin_restart( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1510,7 +1512,7 @@ async def _start_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1556,7 +1558,7 @@ async def begin_start( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Start a virtual machine. This operation can take a while to complete. @@ -1568,8 +1570,8 @@ async def begin_start( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1625,7 +1627,7 @@ async def _stop_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1671,7 +1673,7 @@ async def begin_stop( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Stop a virtual machine This operation can take a while to complete. @@ -1683,8 +1685,8 @@ async def begin_stop( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1740,7 +1742,7 @@ async def _transfer_disks_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1786,7 +1788,7 @@ async def begin_transfer_disks( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Transfers all data disks attached to the virtual machine to be owned by the current user. This operation can take a while to complete. @@ -1799,8 +1801,8 @@ async def begin_transfer_disks( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1856,7 +1858,7 @@ async def _un_claim_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1902,7 +1904,7 @@ async def begin_un_claim( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Release ownership of an existing virtual machine This operation can take a while to complete. @@ -1914,8 +1916,8 @@ async def begin_un_claim( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_networks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_networks_operations.py index 624b20adfe4c..2bd9493c4369 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_networks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_virtual_networks_operations.py @@ -51,7 +51,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VirtualNetworkList"]: """List virtual networks in a given lab. @@ -144,7 +144,7 @@ async def get( lab_name: str, name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.VirtualNetwork": """Get virtual network. @@ -211,7 +211,7 @@ async def _create_or_update_initial( lab_name: str, name: str, virtual_network: "_models.VirtualNetwork", - **kwargs + **kwargs: Any ) -> "_models.VirtualNetwork": cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] error_map = { @@ -270,7 +270,7 @@ async def begin_create_or_update( lab_name: str, name: str, virtual_network: "_models.VirtualNetwork", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.VirtualNetwork"]: """Create or replace an existing virtual network. This operation can take a while to complete. @@ -284,8 +284,8 @@ async def begin_create_or_update( :type virtual_network: ~azure.mgmt.devtestlabs.models.VirtualNetwork :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: True for ARMPolling, False for no polling, or a - polling object for 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 VirtualNetwork or the result of cls(response) @@ -345,7 +345,7 @@ async def _delete_initial( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -391,7 +391,7 @@ async def begin_delete( resource_group_name: str, lab_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete virtual network. This operation can take a while to complete. @@ -403,8 +403,8 @@ async def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -460,8 +460,8 @@ async def update( resource_group_name: str, lab_name: str, name: str, - virtual_network: "_models.VirtualNetworkFragment", - **kwargs + tags: Optional[Dict[str, str]] = None, + **kwargs: Any ) -> "_models.VirtualNetwork": """Allows modifying tags of virtual networks. All other properties will be ignored. @@ -471,8 +471,8 @@ async def update( :type lab_name: str :param name: The name of the virtual network. :type name: str - :param virtual_network: A virtual network. - :type virtual_network: ~azure.mgmt.devtestlabs.models.VirtualNetworkFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.VirtualNetwork @@ -483,6 +483,8 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _virtual_network = _models.VirtualNetworkFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -507,7 +509,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(virtual_network, 'VirtualNetworkFragment') + body_content = self._serialize.body(_virtual_network, 'VirtualNetworkFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py index 4018a95629c3..1d3df1c1f7f1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py @@ -14,46 +14,31 @@ from ._models_py3 import ArmTemplateInfo from ._models_py3 import ArmTemplateList from ._models_py3 import ArmTemplateParameterProperties - from ._models_py3 import ArmTemplateParameterPropertiesFragment from ._models_py3 import Artifact from ._models_py3 import ArtifactDeploymentStatusProperties - from ._models_py3 import ArtifactDeploymentStatusPropertiesFragment from ._models_py3 import ArtifactInstallProperties - from ._models_py3 import ArtifactInstallPropertiesFragment from ._models_py3 import ArtifactList from ._models_py3 import ArtifactParameterProperties - from ._models_py3 import ArtifactParameterPropertiesFragment from ._models_py3 import ArtifactSource from ._models_py3 import ArtifactSourceFragment from ._models_py3 import ArtifactSourceList from ._models_py3 import AttachDiskProperties from ._models_py3 import AttachNewDataDiskOptions - from ._models_py3 import AttachNewDataDiskOptionsFragment from ._models_py3 import BulkCreationParameters - from ._models_py3 import BulkCreationParametersFragment from ._models_py3 import CloudErrorBody from ._models_py3 import ComputeDataDisk - from ._models_py3 import ComputeDataDiskFragment from ._models_py3 import ComputeVmInstanceViewStatus - from ._models_py3 import ComputeVmInstanceViewStatusFragment from ._models_py3 import ComputeVmProperties - from ._models_py3 import ComputeVmPropertiesFragment from ._models_py3 import CostThresholdProperties from ._models_py3 import CustomImage from ._models_py3 import CustomImageFragment from ._models_py3 import CustomImageList from ._models_py3 import CustomImagePropertiesCustom - from ._models_py3 import CustomImagePropertiesCustomFragment from ._models_py3 import CustomImagePropertiesFromPlan - from ._models_py3 import CustomImagePropertiesFromPlanFragment from ._models_py3 import CustomImagePropertiesFromVm - from ._models_py3 import CustomImagePropertiesFromVmFragment from ._models_py3 import DataDiskProperties - from ._models_py3 import DataDiskPropertiesFragment from ._models_py3 import DataDiskStorageTypeInfo - from ._models_py3 import DataDiskStorageTypeInfoFragment from ._models_py3 import DayDetails - from ._models_py3 import DayDetailsFragment from ._models_py3 import DetachDataDiskProperties from ._models_py3 import DetachDiskProperties from ._models_py3 import Disk @@ -63,36 +48,28 @@ from ._models_py3 import DtlEnvironmentFragment from ._models_py3 import DtlEnvironmentList from ._models_py3 import EnvironmentDeploymentProperties - from ._models_py3 import EnvironmentDeploymentPropertiesFragment from ._models_py3 import EvaluatePoliciesProperties from ._models_py3 import EvaluatePoliciesRequest from ._models_py3 import EvaluatePoliciesResponse from ._models_py3 import Event - from ._models_py3 import EventFragment from ._models_py3 import ExportResourceUsageParameters from ._models_py3 import ExternalSubnet - from ._models_py3 import ExternalSubnetFragment from ._models_py3 import Formula from ._models_py3 import FormulaFragment from ._models_py3 import FormulaList from ._models_py3 import FormulaPropertiesFromVm - from ._models_py3 import FormulaPropertiesFromVmFragment from ._models_py3 import GalleryImage from ._models_py3 import GalleryImageList from ._models_py3 import GalleryImageReference - from ._models_py3 import GalleryImageReferenceFragment from ._models_py3 import GenerateArmTemplateRequest from ._models_py3 import GenerateUploadUriParameter from ._models_py3 import GenerateUploadUriResponse from ._models_py3 import HourDetails - from ._models_py3 import HourDetailsFragment from ._models_py3 import IdentityProperties from ._models_py3 import ImportLabVirtualMachineRequest from ._models_py3 import InboundNatRule - from ._models_py3 import InboundNatRuleFragment from ._models_py3 import Lab from ._models_py3 import LabAnnouncementProperties - from ._models_py3 import LabAnnouncementPropertiesFragment from ._models_py3 import LabCost from ._models_py3 import LabCostDetailsProperties from ._models_py3 import LabCostSummaryProperties @@ -100,23 +77,18 @@ from ._models_py3 import LabList from ._models_py3 import LabResourceCostProperties from ._models_py3 import LabSupportProperties - from ._models_py3 import LabSupportPropertiesFragment from ._models_py3 import LabVhd from ._models_py3 import LabVhdList from ._models_py3 import LabVirtualMachine from ._models_py3 import LabVirtualMachineCreationParameter - from ._models_py3 import LabVirtualMachineCreationParameterFragment from ._models_py3 import LabVirtualMachineFragment from ._models_py3 import LabVirtualMachineList from ._models_py3 import LinuxOsInfo - from ._models_py3 import LinuxOsInfoFragment from ._models_py3 import NetworkInterfaceProperties - from ._models_py3 import NetworkInterfacePropertiesFragment from ._models_py3 import NotificationChannel from ._models_py3 import NotificationChannelFragment from ._models_py3 import NotificationChannelList from ._models_py3 import NotificationSettings - from ._models_py3 import NotificationSettingsFragment from ._models_py3 import NotifyParameters from ._models_py3 import OperationError from ._models_py3 import OperationMetadata @@ -131,7 +103,6 @@ from ._models_py3 import PolicySetResult from ._models_py3 import PolicyViolation from ._models_py3 import Port - from ._models_py3 import PortFragment from ._models_py3 import ProviderOperationResult from ._models_py3 import RdpConnection from ._models_py3 import ResizeLabVirtualMachineProperties @@ -139,7 +110,6 @@ from ._models_py3 import RetargetScheduleProperties from ._models_py3 import Schedule from ._models_py3 import ScheduleCreationParameter - from ._models_py3 import ScheduleCreationParameterFragment from ._models_py3 import ScheduleFragment from ._models_py3 import ScheduleList from ._models_py3 import Secret @@ -149,31 +119,24 @@ from ._models_py3 import ServiceFabricFragment from ._models_py3 import ServiceFabricList from ._models_py3 import ServiceRunner + from ._models_py3 import ServiceRunnerList from ._models_py3 import SharedPublicIpAddressConfiguration - from ._models_py3 import SharedPublicIpAddressConfigurationFragment from ._models_py3 import ShutdownNotificationContent from ._models_py3 import Subnet - from ._models_py3 import SubnetFragment from ._models_py3 import SubnetOverride - from ._models_py3 import SubnetOverrideFragment from ._models_py3 import SubnetSharedPublicIpAddressConfiguration - from ._models_py3 import SubnetSharedPublicIpAddressConfigurationFragment from ._models_py3 import TargetCostProperties from ._models_py3 import UpdateResource from ._models_py3 import User from ._models_py3 import UserFragment from ._models_py3 import UserIdentity - from ._models_py3 import UserIdentityFragment from ._models_py3 import UserList from ._models_py3 import UserSecretStore - from ._models_py3 import UserSecretStoreFragment from ._models_py3 import VirtualNetwork from ._models_py3 import VirtualNetworkFragment from ._models_py3 import VirtualNetworkList from ._models_py3 import WeekDetails - from ._models_py3 import WeekDetailsFragment from ._models_py3 import WindowsOsInfo - from ._models_py3 import WindowsOsInfoFragment except (SyntaxError, ImportError): from ._models import ApplicableSchedule # type: ignore from ._models import ApplicableScheduleFragment # type: ignore @@ -182,46 +145,31 @@ from ._models import ArmTemplateInfo # type: ignore from ._models import ArmTemplateList # type: ignore from ._models import ArmTemplateParameterProperties # type: ignore - from ._models import ArmTemplateParameterPropertiesFragment # type: ignore from ._models import Artifact # type: ignore from ._models import ArtifactDeploymentStatusProperties # type: ignore - from ._models import ArtifactDeploymentStatusPropertiesFragment # type: ignore from ._models import ArtifactInstallProperties # type: ignore - from ._models import ArtifactInstallPropertiesFragment # type: ignore from ._models import ArtifactList # type: ignore from ._models import ArtifactParameterProperties # type: ignore - from ._models import ArtifactParameterPropertiesFragment # type: ignore from ._models import ArtifactSource # type: ignore from ._models import ArtifactSourceFragment # type: ignore from ._models import ArtifactSourceList # type: ignore from ._models import AttachDiskProperties # type: ignore from ._models import AttachNewDataDiskOptions # type: ignore - from ._models import AttachNewDataDiskOptionsFragment # type: ignore from ._models import BulkCreationParameters # type: ignore - from ._models import BulkCreationParametersFragment # type: ignore from ._models import CloudErrorBody # type: ignore from ._models import ComputeDataDisk # type: ignore - from ._models import ComputeDataDiskFragment # type: ignore from ._models import ComputeVmInstanceViewStatus # type: ignore - from ._models import ComputeVmInstanceViewStatusFragment # type: ignore from ._models import ComputeVmProperties # type: ignore - from ._models import ComputeVmPropertiesFragment # type: ignore from ._models import CostThresholdProperties # type: ignore from ._models import CustomImage # type: ignore from ._models import CustomImageFragment # type: ignore from ._models import CustomImageList # type: ignore from ._models import CustomImagePropertiesCustom # type: ignore - from ._models import CustomImagePropertiesCustomFragment # type: ignore from ._models import CustomImagePropertiesFromPlan # type: ignore - from ._models import CustomImagePropertiesFromPlanFragment # type: ignore from ._models import CustomImagePropertiesFromVm # type: ignore - from ._models import CustomImagePropertiesFromVmFragment # type: ignore from ._models import DataDiskProperties # type: ignore - from ._models import DataDiskPropertiesFragment # type: ignore from ._models import DataDiskStorageTypeInfo # type: ignore - from ._models import DataDiskStorageTypeInfoFragment # type: ignore from ._models import DayDetails # type: ignore - from ._models import DayDetailsFragment # type: ignore from ._models import DetachDataDiskProperties # type: ignore from ._models import DetachDiskProperties # type: ignore from ._models import Disk # type: ignore @@ -231,36 +179,28 @@ from ._models import DtlEnvironmentFragment # type: ignore from ._models import DtlEnvironmentList # type: ignore from ._models import EnvironmentDeploymentProperties # type: ignore - from ._models import EnvironmentDeploymentPropertiesFragment # type: ignore from ._models import EvaluatePoliciesProperties # type: ignore from ._models import EvaluatePoliciesRequest # type: ignore from ._models import EvaluatePoliciesResponse # type: ignore from ._models import Event # type: ignore - from ._models import EventFragment # type: ignore from ._models import ExportResourceUsageParameters # type: ignore from ._models import ExternalSubnet # type: ignore - from ._models import ExternalSubnetFragment # type: ignore from ._models import Formula # type: ignore from ._models import FormulaFragment # type: ignore from ._models import FormulaList # type: ignore from ._models import FormulaPropertiesFromVm # type: ignore - from ._models import FormulaPropertiesFromVmFragment # type: ignore from ._models import GalleryImage # type: ignore from ._models import GalleryImageList # type: ignore from ._models import GalleryImageReference # type: ignore - from ._models import GalleryImageReferenceFragment # type: ignore from ._models import GenerateArmTemplateRequest # type: ignore from ._models import GenerateUploadUriParameter # type: ignore from ._models import GenerateUploadUriResponse # type: ignore from ._models import HourDetails # type: ignore - from ._models import HourDetailsFragment # type: ignore from ._models import IdentityProperties # type: ignore from ._models import ImportLabVirtualMachineRequest # type: ignore from ._models import InboundNatRule # type: ignore - from ._models import InboundNatRuleFragment # type: ignore from ._models import Lab # type: ignore from ._models import LabAnnouncementProperties # type: ignore - from ._models import LabAnnouncementPropertiesFragment # type: ignore from ._models import LabCost # type: ignore from ._models import LabCostDetailsProperties # type: ignore from ._models import LabCostSummaryProperties # type: ignore @@ -268,23 +208,18 @@ from ._models import LabList # type: ignore from ._models import LabResourceCostProperties # type: ignore from ._models import LabSupportProperties # type: ignore - from ._models import LabSupportPropertiesFragment # type: ignore from ._models import LabVhd # type: ignore from ._models import LabVhdList # type: ignore from ._models import LabVirtualMachine # type: ignore from ._models import LabVirtualMachineCreationParameter # type: ignore - from ._models import LabVirtualMachineCreationParameterFragment # type: ignore from ._models import LabVirtualMachineFragment # type: ignore from ._models import LabVirtualMachineList # type: ignore from ._models import LinuxOsInfo # type: ignore - from ._models import LinuxOsInfoFragment # type: ignore from ._models import NetworkInterfaceProperties # type: ignore - from ._models import NetworkInterfacePropertiesFragment # type: ignore from ._models import NotificationChannel # type: ignore from ._models import NotificationChannelFragment # type: ignore from ._models import NotificationChannelList # type: ignore from ._models import NotificationSettings # type: ignore - from ._models import NotificationSettingsFragment # type: ignore from ._models import NotifyParameters # type: ignore from ._models import OperationError # type: ignore from ._models import OperationMetadata # type: ignore @@ -299,7 +234,6 @@ from ._models import PolicySetResult # type: ignore from ._models import PolicyViolation # type: ignore from ._models import Port # type: ignore - from ._models import PortFragment # type: ignore from ._models import ProviderOperationResult # type: ignore from ._models import RdpConnection # type: ignore from ._models import ResizeLabVirtualMachineProperties # type: ignore @@ -307,7 +241,6 @@ from ._models import RetargetScheduleProperties # type: ignore from ._models import Schedule # type: ignore from ._models import ScheduleCreationParameter # type: ignore - from ._models import ScheduleCreationParameterFragment # type: ignore from ._models import ScheduleFragment # type: ignore from ._models import ScheduleList # type: ignore from ._models import Secret # type: ignore @@ -317,31 +250,24 @@ from ._models import ServiceFabricFragment # type: ignore from ._models import ServiceFabricList # type: ignore from ._models import ServiceRunner # type: ignore + from ._models import ServiceRunnerList # type: ignore from ._models import SharedPublicIpAddressConfiguration # type: ignore - from ._models import SharedPublicIpAddressConfigurationFragment # type: ignore from ._models import ShutdownNotificationContent # type: ignore from ._models import Subnet # type: ignore - from ._models import SubnetFragment # type: ignore from ._models import SubnetOverride # type: ignore - from ._models import SubnetOverrideFragment # type: ignore from ._models import SubnetSharedPublicIpAddressConfiguration # type: ignore - from ._models import SubnetSharedPublicIpAddressConfigurationFragment # type: ignore from ._models import TargetCostProperties # type: ignore from ._models import UpdateResource # type: ignore from ._models import User # type: ignore from ._models import UserFragment # type: ignore from ._models import UserIdentity # type: ignore - from ._models import UserIdentityFragment # type: ignore from ._models import UserList # type: ignore from ._models import UserSecretStore # type: ignore - from ._models import UserSecretStoreFragment # type: ignore from ._models import VirtualNetwork # type: ignore from ._models import VirtualNetworkFragment # type: ignore from ._models import VirtualNetworkList # type: ignore from ._models import WeekDetails # type: ignore - from ._models import WeekDetailsFragment # type: ignore from ._models import WindowsOsInfo # type: ignore - from ._models import WindowsOsInfoFragment # type: ignore from ._dev_test_labs_client_enums import ( CostThresholdStatus, @@ -353,6 +279,7 @@ HostCachingOptions, HttpStatusCode, LinuxOsState, + ManagedIdentityType, NotificationChannelEventType, PolicyEvaluatorType, PolicyFactName, @@ -376,46 +303,31 @@ 'ArmTemplateInfo', 'ArmTemplateList', 'ArmTemplateParameterProperties', - 'ArmTemplateParameterPropertiesFragment', 'Artifact', 'ArtifactDeploymentStatusProperties', - 'ArtifactDeploymentStatusPropertiesFragment', 'ArtifactInstallProperties', - 'ArtifactInstallPropertiesFragment', 'ArtifactList', 'ArtifactParameterProperties', - 'ArtifactParameterPropertiesFragment', 'ArtifactSource', 'ArtifactSourceFragment', 'ArtifactSourceList', 'AttachDiskProperties', 'AttachNewDataDiskOptions', - 'AttachNewDataDiskOptionsFragment', 'BulkCreationParameters', - 'BulkCreationParametersFragment', 'CloudErrorBody', 'ComputeDataDisk', - 'ComputeDataDiskFragment', 'ComputeVmInstanceViewStatus', - 'ComputeVmInstanceViewStatusFragment', 'ComputeVmProperties', - 'ComputeVmPropertiesFragment', 'CostThresholdProperties', 'CustomImage', 'CustomImageFragment', 'CustomImageList', 'CustomImagePropertiesCustom', - 'CustomImagePropertiesCustomFragment', 'CustomImagePropertiesFromPlan', - 'CustomImagePropertiesFromPlanFragment', 'CustomImagePropertiesFromVm', - 'CustomImagePropertiesFromVmFragment', 'DataDiskProperties', - 'DataDiskPropertiesFragment', 'DataDiskStorageTypeInfo', - 'DataDiskStorageTypeInfoFragment', 'DayDetails', - 'DayDetailsFragment', 'DetachDataDiskProperties', 'DetachDiskProperties', 'Disk', @@ -425,36 +337,28 @@ 'DtlEnvironmentFragment', 'DtlEnvironmentList', 'EnvironmentDeploymentProperties', - 'EnvironmentDeploymentPropertiesFragment', 'EvaluatePoliciesProperties', 'EvaluatePoliciesRequest', 'EvaluatePoliciesResponse', 'Event', - 'EventFragment', 'ExportResourceUsageParameters', 'ExternalSubnet', - 'ExternalSubnetFragment', 'Formula', 'FormulaFragment', 'FormulaList', 'FormulaPropertiesFromVm', - 'FormulaPropertiesFromVmFragment', 'GalleryImage', 'GalleryImageList', 'GalleryImageReference', - 'GalleryImageReferenceFragment', 'GenerateArmTemplateRequest', 'GenerateUploadUriParameter', 'GenerateUploadUriResponse', 'HourDetails', - 'HourDetailsFragment', 'IdentityProperties', 'ImportLabVirtualMachineRequest', 'InboundNatRule', - 'InboundNatRuleFragment', 'Lab', 'LabAnnouncementProperties', - 'LabAnnouncementPropertiesFragment', 'LabCost', 'LabCostDetailsProperties', 'LabCostSummaryProperties', @@ -462,23 +366,18 @@ 'LabList', 'LabResourceCostProperties', 'LabSupportProperties', - 'LabSupportPropertiesFragment', 'LabVhd', 'LabVhdList', 'LabVirtualMachine', 'LabVirtualMachineCreationParameter', - 'LabVirtualMachineCreationParameterFragment', 'LabVirtualMachineFragment', 'LabVirtualMachineList', 'LinuxOsInfo', - 'LinuxOsInfoFragment', 'NetworkInterfaceProperties', - 'NetworkInterfacePropertiesFragment', 'NotificationChannel', 'NotificationChannelFragment', 'NotificationChannelList', 'NotificationSettings', - 'NotificationSettingsFragment', 'NotifyParameters', 'OperationError', 'OperationMetadata', @@ -493,7 +392,6 @@ 'PolicySetResult', 'PolicyViolation', 'Port', - 'PortFragment', 'ProviderOperationResult', 'RdpConnection', 'ResizeLabVirtualMachineProperties', @@ -501,7 +399,6 @@ 'RetargetScheduleProperties', 'Schedule', 'ScheduleCreationParameter', - 'ScheduleCreationParameterFragment', 'ScheduleFragment', 'ScheduleList', 'Secret', @@ -511,31 +408,24 @@ 'ServiceFabricFragment', 'ServiceFabricList', 'ServiceRunner', + 'ServiceRunnerList', 'SharedPublicIpAddressConfiguration', - 'SharedPublicIpAddressConfigurationFragment', 'ShutdownNotificationContent', 'Subnet', - 'SubnetFragment', 'SubnetOverride', - 'SubnetOverrideFragment', 'SubnetSharedPublicIpAddressConfiguration', - 'SubnetSharedPublicIpAddressConfigurationFragment', 'TargetCostProperties', 'UpdateResource', 'User', 'UserFragment', 'UserIdentity', - 'UserIdentityFragment', 'UserList', 'UserSecretStore', - 'UserSecretStoreFragment', 'VirtualNetwork', 'VirtualNetworkFragment', 'VirtualNetworkList', 'WeekDetails', - 'WeekDetailsFragment', 'WindowsOsInfo', - 'WindowsOsInfoFragment', 'CostThresholdStatus', 'CostType', 'CustomImageOsType', @@ -545,6 +435,7 @@ 'HostCachingOptions', 'HttpStatusCode', 'LinuxOsState', + 'ManagedIdentityType', 'NotificationChannelEventType', 'PolicyEvaluatorType', 'PolicyFactName', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py index 177f446ee1c5..8967cf943cc5 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py @@ -50,7 +50,7 @@ class CustomImageOsType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" class EnableStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """If notifications are enabled for this schedule (i.e. Enabled, Disabled). + """Indicates if the artifact source is enabled (values: Enabled, Disabled). """ ENABLED = "Enabled" @@ -93,13 +93,18 @@ class HttpStatusCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): RESET_CONTENT = "ResetContent" PARTIAL_CONTENT = "PartialContent" MULTIPLE_CHOICES = "MultipleChoices" + AMBIGUOUS = "Ambiguous" MOVED_PERMANENTLY = "MovedPermanently" + MOVED = "Moved" + FOUND = "Found" REDIRECT = "Redirect" SEE_OTHER = "SeeOther" + REDIRECT_METHOD = "RedirectMethod" NOT_MODIFIED = "NotModified" USE_PROXY = "UseProxy" UNUSED = "Unused" TEMPORARY_REDIRECT = "TemporaryRedirect" + REDIRECT_KEEP_VERB = "RedirectKeepVerb" BAD_REQUEST = "BadRequest" UNAUTHORIZED = "Unauthorized" PAYMENT_REQUIRED = "PaymentRequired" @@ -134,6 +139,15 @@ class LinuxOsState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEPROVISION_REQUESTED = "DeprovisionRequested" DEPROVISION_APPLIED = "DeprovisionApplied" +class ManagedIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Managed identity. + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + class NotificationChannelEventType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The event type for which this notification is enabled (i.e. AutoShutdown, Cost) """ @@ -192,6 +206,7 @@ class SourceControlType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): VSO_GIT = "VsoGit" GIT_HUB = "GitHub" + STORAGE_ACCOUNT = "StorageAccount" class StorageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The storage type for the disk (i.e. Standard, Premium). diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py index 41e15954b6bd..0adc6e8e75b5 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py @@ -124,18 +124,10 @@ class ApplicableScheduleFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set at the lab or lab - resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at the lab or lab - resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, } def __init__( @@ -143,8 +135,6 @@ def __init__( **kwargs ): super(ApplicableScheduleFragment, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) class ApplyArtifactsRequest(msrest.serialization.Model): @@ -190,7 +180,7 @@ class ArmTemplate(Resource): :ivar icon: The URI to the icon of the ARM template. :vartype icon: str :ivar contents: The contents of the ARM template. - :vartype contents: object + :vartype contents: any :ivar created_date: The creation date of the armTemplate. :vartype created_date: ~datetime.datetime :ivar parameters_value_files_info: File name and parameter values information from all @@ -250,9 +240,9 @@ class ArmTemplateInfo(msrest.serialization.Model): """Information about a generated ARM template. :param template: The template's contents. - :type template: object + :type template: any :param parameters: The parameters of the ARM template. - :type parameters: object + :type parameters: any """ _attribute_map = { @@ -315,29 +305,6 @@ def __init__( self.value = kwargs.get('value', None) -class ArmTemplateParameterPropertiesFragment(msrest.serialization.Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - class Artifact(Resource): """An artifact. @@ -366,7 +333,7 @@ class Artifact(Resource): :ivar target_os_type: The artifact's target OS. :vartype target_os_type: str :ivar parameters: The artifact's parameters. - :vartype parameters: object + :vartype parameters: any :ivar created_date: The artifact's creation date. :vartype created_date: ~datetime.datetime """ @@ -443,33 +410,6 @@ def __init__( self.total_artifacts = kwargs.get('total_artifacts', None) -class ArtifactDeploymentStatusPropertiesFragment(msrest.serialization.Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) - - class ArtifactInstallProperties(msrest.serialization.Model): """Properties of an artifact. @@ -513,49 +453,6 @@ def __init__( self.install_time = kwargs.get('install_time', None) -class ArtifactInstallPropertiesFragment(msrest.serialization.Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the virtual machine. - :type install_time: ~datetime.datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) - - class ArtifactList(msrest.serialization.Model): """The response of a list operation. @@ -602,29 +499,6 @@ def __init__( self.value = kwargs.get('value', None) -class ArtifactParameterPropertiesFragment(msrest.serialization.Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - class ArtifactSource(Resource): """Properties of an artifact source. @@ -644,7 +518,8 @@ class ArtifactSource(Resource): :type display_name: str :param uri: The artifact source's URI. :type uri: str - :param source_type: The artifact source's type. Possible values include: "VsoGit", "GitHub". + :param source_type: The artifact source's type. Possible values include: "VsoGit", "GitHub", + "StorageAccount". :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType :param folder_path: The folder containing artifacts. :type folder_path: str @@ -716,35 +591,10 @@ class ArtifactSourceFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: "VsoGit", "GitHub". - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: Enabled, Disabled). - Possible values include: "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, } def __init__( @@ -752,14 +602,6 @@ def __init__( **kwargs ): super(ArtifactSourceFragment, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) class ArtifactSourceList(msrest.serialization.Model): @@ -808,7 +650,7 @@ def __init__( class AttachNewDataDiskOptions(msrest.serialization.Model): """Properties to attach new disk to the Virtual Machine. - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. :type disk_size_gi_b: int :param disk_name: The name of the disk to be attached. :type disk_name: str @@ -833,34 +675,6 @@ def __init__( self.disk_type = kwargs.get('disk_type', None) -class AttachNewDataDiskOptionsFragment(msrest.serialization.Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values - include: "Standard", "Premium", "StandardSSD". - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) - - class BulkCreationParameters(msrest.serialization.Model): """Parameters for creating multiple virtual machines as a single action. @@ -880,25 +694,6 @@ def __init__( self.instance_count = kwargs.get('instance_count', None) -class BulkCreationParametersFragment(msrest.serialization.Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - - class CloudErrorBody(msrest.serialization.Model): """Body of an error from a REST request. @@ -962,38 +757,6 @@ def __init__( self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) -class ComputeDataDiskFragment(msrest.serialization.Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the compute disk - resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - - class ComputeVmInstanceViewStatus(msrest.serialization.Model): """Status information about a virtual machine. @@ -1021,33 +784,6 @@ def __init__( self.message = kwargs.get('message', None) -class ComputeVmInstanceViewStatusFragment(msrest.serialization.Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - - class ComputeVmProperties(msrest.serialization.Model): """Properties of a virtual machine returned by the Microsoft.Compute API. @@ -1091,51 +827,8 @@ def __init__( self.data_disks = kwargs.get('data_disks', None) -class ComputeVmPropertiesFragment(msrest.serialization.Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__( - self, - **kwargs - ): - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) - - -class CostThresholdProperties(msrest.serialization.Model): - """Properties of a cost threshold item. +class CostThresholdProperties(msrest.serialization.Model): + """Properties of a cost threshold item. :param threshold_id: The ID of the cost threshold item. :type threshold_id: str @@ -1269,40 +962,10 @@ class CustomImageFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks present in the custom - image. - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to this custom image. - :type custom_image_plan: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying offer/plan has been - enabled for programmatic deployment. - :type is_plan_authorized: bool """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, } def __init__( @@ -1310,15 +973,6 @@ def __init__( **kwargs ): super(CustomImageFragment, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) class CustomImageList(msrest.serialization.Model): @@ -1378,34 +1032,6 @@ def __init__( self.os_type = kwargs['os_type'] -class CustomImagePropertiesCustomFragment(msrest.serialization.Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). Possible values include: - "Windows", "Linux", "None". - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) - - class CustomImagePropertiesFromPlan(msrest.serialization.Model): """Properties for plan on a custom image. @@ -1435,35 +1061,6 @@ def __init__( self.offer = kwargs.get('offer', None) -class CustomImagePropertiesFromPlanFragment(msrest.serialization.Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan. - :type id: str - :param publisher: The publisher for the plan from the marketplace image the custom image is - derived from. - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom image is derived - from. - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - - class CustomImagePropertiesFromVm(msrest.serialization.Model): """Properties for creating a custom image from a virtual machine. @@ -1491,33 +1088,6 @@ def __init__( self.linux_os_info = kwargs.get('linux_os_info', None) -class CustomImagePropertiesFromVmFragment(msrest.serialization.Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__( - self, - **kwargs - ): - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) - - class DataDiskProperties(msrest.serialization.Model): """Request body for adding a new or existing data disk to a virtual machine. @@ -1547,36 +1117,6 @@ def __init__( self.host_caching = kwargs.get('host_caching', None) -class DataDiskPropertiesFragment(msrest.serialization.Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new disk to the virtual - machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, ReadWrite). Possible - values include: "None", "ReadOnly", "ReadWrite". - :type host_caching: str or ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) - - class DataDiskStorageTypeInfo(msrest.serialization.Model): """Storage information about the data disks present in the custom image. @@ -1601,30 +1141,6 @@ def __init__( self.storage_type = kwargs.get('storage_type', None) -class DataDiskStorageTypeInfoFragment(msrest.serialization.Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun. - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: "Standard", "Premium", - "StandardSSD". - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) - - class DayDetails(msrest.serialization.Model): """Properties of a daily schedule. @@ -1644,25 +1160,6 @@ def __init__( self.time = kwargs.get('time', None) -class DayDetailsFragment(msrest.serialization.Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = kwargs.get('time', None) - - class DetachDataDiskProperties(msrest.serialization.Model): """Request body for detaching data disk from a virtual machine. @@ -1719,7 +1216,7 @@ class Disk(Resource): :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values include: "Standard", "Premium", "StandardSSD". :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. + :param disk_size_gi_b: The size of the disk in Gibibytes. :type disk_size_gi_b: int :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. :type leased_by_lab_vm_id: str @@ -1727,6 +1224,8 @@ class Disk(Resource): :type disk_blob_name: str :param disk_uri: When backed by a blob, the URI of underlying blob. :type disk_uri: str + :param storage_account_id: When backed by a blob, the storage account where the blob is. + :type storage_account_id: str :ivar created_date: The creation date of the disk. :vartype created_date: ~datetime.datetime :param host_caching: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). @@ -1760,6 +1259,7 @@ class Disk(Resource): 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, @@ -1777,6 +1277,7 @@ def __init__( self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) self.disk_blob_name = kwargs.get('disk_blob_name', None) self.disk_uri = kwargs.get('disk_uri', None) + self.storage_account_id = kwargs.get('storage_account_id', None) self.created_date = None self.host_caching = kwargs.get('host_caching', None) self.managed_disk_id = kwargs.get('managed_disk_id', None) @@ -1789,33 +1290,10 @@ class DiskFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values - include: "Standard", "Premium", "StandardSSD". - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the compute disk - resource. - :type managed_disk_id: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, } def __init__( @@ -1823,13 +1301,6 @@ def __init__( **kwargs ): super(DiskFragment, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) class DiskList(msrest.serialization.Model): @@ -1928,18 +1399,10 @@ class DtlEnvironmentFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource Manager template that - produced the environment. - :type arm_template_display_name: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, } def __init__( @@ -1947,8 +1410,6 @@ def __init__( **kwargs ): super(DtlEnvironmentFragment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) class DtlEnvironmentList(msrest.serialization.Model): @@ -1997,29 +1458,6 @@ def __init__( self.parameters = kwargs.get('parameters', None) -class EnvironmentDeploymentPropertiesFragment(msrest.serialization.Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__( - self, - **kwargs - ): - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) - - class EvaluatePoliciesProperties(msrest.serialization.Model): """Properties for evaluating a policy set. @@ -2109,28 +1547,8 @@ def __init__( self.event_name = kwargs.get('event_name', None) -class EventFragment(msrest.serialization.Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled (i.e. AutoShutdown, - Cost). Possible values include: "AutoShutdown", "Cost". - :type event_name: str or ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EventFragment, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) - - -class ExportResourceUsageParameters(msrest.serialization.Model): - """The parameters of the export operation. +class ExportResourceUsageParameters(msrest.serialization.Model): + """The parameters of the export operation. :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri with write permission to the container which the usage data needs to be uploaded to. @@ -2177,29 +1595,6 @@ def __init__( self.name = kwargs.get('name', None) -class ExternalSubnetFragment(msrest.serialization.Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - - class Formula(Resource): """A formula for creating a VM, specifying an image base and other parameters. @@ -2217,8 +1612,8 @@ class Formula(Resource): :type tags: dict[str, str] :param description: The description of the formula. :type description: str - :param author: The author of the formula. - :type author: str + :ivar author: The author of the formula. + :vartype author: str :param os_type: The OS type of the formula. :type os_type: str :ivar creation_date: The creation date of the formula. @@ -2237,6 +1632,7 @@ class Formula(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'author': {'readonly': True}, 'creation_date': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'unique_identifier': {'readonly': True}, @@ -2264,7 +1660,7 @@ def __init__( ): super(Formula, self).__init__(**kwargs) self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) + self.author = None self.os_type = kwargs.get('os_type', None) self.creation_date = None self.formula_content = kwargs.get('formula_content', None) @@ -2278,26 +1674,10 @@ class FormulaFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, } def __init__( @@ -2305,11 +1685,6 @@ def __init__( **kwargs ): super(FormulaFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) class FormulaList(msrest.serialization.Model): @@ -2354,25 +1729,6 @@ def __init__( self.lab_vm_id = kwargs.get('lab_vm_id', None) -class FormulaPropertiesFromVmFragment(msrest.serialization.Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) - - class GalleryImage(Resource): """A gallery image. @@ -2503,41 +1859,6 @@ def __init__( self.version = kwargs.get('version', None) -class GalleryImageReferenceFragment(msrest.serialization.Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) - - class GenerateArmTemplateRequest(msrest.serialization.Model): """Parameters for generating an ARM template for deploying artifacts. @@ -2628,30 +1949,12 @@ def __init__( self.minute = kwargs.get('minute', None) -class HourDetailsFragment(msrest.serialization.Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) - - class IdentityProperties(msrest.serialization.Model): """Properties of a managed identity. - :param type: Managed identity. - :type type: str + :param type: Managed identity. Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :type type: str or ~azure.mgmt.devtestlabs.models.ManagedIdentityType :param principal_id: The principal id of resource identity. :type principal_id: str :param tenant_id: The tenant identifier of resource. @@ -2732,35 +2035,6 @@ def __init__( self.backend_port = kwargs.get('backend_port', None) -class InboundNatRuleFragment(msrest.serialization.Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. Possible values include: - "Tcp", "Udp". - :type transport_protocol: str or ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound connection. Possible values - range between 1 and 65535, inclusive. If unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - - class Lab(Resource): """A lab. @@ -2954,43 +2228,6 @@ def __init__( self.unique_identifier = None -class LabAnnouncementPropertiesFragment(msrest.serialization.Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement. - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the UI. If left - empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. Possible values include: - "Enabled", "Disabled". - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null for never). - :type expiration_date: ~datetime.datetime - :param expired: Has this announcement expired?. - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) - - class LabCost(Resource): """A cost item. @@ -3126,43 +2363,10 @@ class LabFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either Premium or Standard. - Default is Premium. Possible values include: "Standard", "Premium", "StandardSSD". - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of artifact resource IDs that - should be applied on all Linux VM creations by default, prior to the artifacts specified by the - user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of artifact resource IDs that - should be applied on all Windows VM creations by default, prior to the artifacts specified by - the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data disks. - When its value is 'Enabled', creation of standard or premium data disks is allowed. - When its value is 'Disabled', only creation of standard data disks is allowed. Possible values - include: "Disabled", "Enabled". - :type premium_data_disks: str or ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user when provisioning an - environment. Possible values include: "Reader", "Contributor". - :type environment_permission: str or ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated with this lab. - :type announcement: ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with this lab. - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for experimental features. - :type extended_properties: dict[str, str] """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, } def __init__( @@ -3170,14 +2374,6 @@ def __init__( **kwargs ): super(LabFragment, self).__init__(**kwargs) - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.extended_properties = kwargs.get('extended_properties', None) class LabList(msrest.serialization.Model): @@ -3279,31 +2475,6 @@ def __init__( self.markdown = kwargs.get('markdown', None) -class LabSupportPropertiesFragment(msrest.serialization.Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. Possible values - include: "Enabled", "Disabled". - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the UI. If left - empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) - - class LabVhd(msrest.serialization.Model): """Properties of a VHD in the lab. @@ -3367,18 +2538,18 @@ class LabVirtualMachine(Resource): :type owner_object_id: str :param owner_user_principal_name: The user principal name of the virtual machine owner. :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str + :ivar created_by_user_id: The object identifier of the creator of the virtual machine. + :vartype created_by_user_id: str + :ivar created_by_user: The email address of creator of the virtual machine. + :vartype created_by_user: str :param created_date: The creation date of the virtual machine. :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str + :ivar compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. + :vartype compute_id: str :param custom_image_id: The custom image identifier of the virtual machine. :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str + :ivar os_type: The OS type of the virtual machine. + :vartype os_type: str :param size: The size of the virtual machine. :type size: str :param user_name: The user name of the virtual machine. @@ -3390,8 +2561,8 @@ class LabVirtualMachine(Resource): :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key for authentication. :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str + :ivar fqdn: The fully-qualified domain name of the virtual machine. + :vartype fqdn: str :param lab_subnet_name: The lab subnet name of the virtual machine. :type lab_subnet_name: str :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. @@ -3401,8 +2572,8 @@ class LabVirtualMachine(Resource): :type disallow_public_ip_address: bool :param artifacts: The artifacts to be installed on the virtual machine. :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: + :ivar artifact_deployment_status: The artifact deployment status for the virtual machine. + :vartype artifact_deployment_status: ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual machine. @@ -3421,10 +2592,10 @@ class LabVirtualMachine(Resource): :type allow_claim: bool :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output + :ivar virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output property only. Possible values include: "FromCustomImage", "FromGalleryImage", "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or + :vartype virtual_machine_creation_source: str or ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource :param environment_id: The resource ID of the environment that contains this virtual machine, if any. @@ -3434,8 +2605,8 @@ class LabVirtualMachine(Resource): :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskProperties] :param schedule_parameters: Virtual Machine schedules to be created. :type schedule_parameters: list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str + :ivar last_known_power_state: Last known compute power state captured in DTL. + :vartype last_known_power_state: str :ivar provisioning_state: The provisioning status of the resource. :vartype provisioning_state: str :ivar unique_identifier: The unique immutable identifier of a resource (Guid). @@ -3446,8 +2617,16 @@ class LabVirtualMachine(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'created_by_user_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'compute_id': {'readonly': True}, + 'os_type': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'artifact_deployment_status': {'readonly': True}, 'compute_vm': {'readonly': True}, 'applicable_schedule': {'readonly': True}, + 'virtual_machine_creation_source': {'readonly': True}, + 'last_known_power_state': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'unique_identifier': {'readonly': True}, } @@ -3501,38 +2680,38 @@ def __init__( ): super(LabVirtualMachine, self).__init__(**kwargs) self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_object_id = kwargs.get('owner_object_id', "dynamicValue") self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) + self.created_by_user_id = None + self.created_by_user = None self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) + self.compute_id = None self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) + self.os_type = None self.size = kwargs.get('size', None) self.user_name = kwargs.get('user_name', None) self.password = kwargs.get('password', None) self.ssh_key = kwargs.get('ssh_key', None) self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) + self.fqdn = None self.lab_subnet_name = kwargs.get('lab_subnet_name', None) self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', False) self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.artifact_deployment_status = None self.gallery_image_reference = kwargs.get('gallery_image_reference', None) self.plan_id = kwargs.get('plan_id', None) self.compute_vm = None self.network_interface = kwargs.get('network_interface', None) self.applicable_schedule = None self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.allow_claim = kwargs.get('allow_claim', False) + self.storage_type = kwargs.get('storage_type', "labStorageType") + self.virtual_machine_creation_source = None self.environment_id = kwargs.get('environment_id', None) self.data_disk_parameters = kwargs.get('data_disk_parameters', None) self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.last_known_power_state = None self.provisioning_state = None self.unique_identifier = None @@ -3554,18 +2733,10 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type owner_object_id: str :param owner_user_principal_name: The user principal name of the virtual machine owner. :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str :param created_date: The creation date of the virtual machine. :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str :param custom_image_id: The custom image identifier of the virtual machine. :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str :param size: The size of the virtual machine. :type size: str :param user_name: The user name of the virtual machine. @@ -3577,8 +2748,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key for authentication. :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str :param lab_subnet_name: The lab subnet name of the virtual machine. :type lab_subnet_name: str :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. @@ -3588,9 +2757,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type disallow_public_ip_address: bool :param artifacts: The artifacts to be installed on the virtual machine. :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual machine. :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReference @@ -3604,11 +2770,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type allow_claim: bool :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output - property only. Possible values include: "FromCustomImage", "FromGalleryImage", - "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource :param environment_id: The resource ID of the environment that contains this virtual machine, if any. :type environment_id: str @@ -3617,8 +2778,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskProperties] :param schedule_parameters: Virtual Machine schedules to be created. :type schedule_parameters: list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str """ _attribute_map = { @@ -3629,34 +2788,26 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): 'notes': {'key': 'properties.notes', 'type': 'str'}, 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, 'size': {'key': 'properties.size', 'type': 'str'}, 'user_name': {'key': 'properties.userName', 'type': 'str'}, 'password': {'key': 'properties.password', 'type': 'str'}, 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, 'plan_id': {'key': 'properties.planId', 'type': 'str'}, 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, } def __init__( @@ -3664,358 +2815,51 @@ def __init__( **kwargs ): super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - - -class LabVirtualMachineCreationParameterFragment(msrest.serialization.Model): - """Properties for creating a virtual machine. - - :param name: The name of the virtual machine or environment. - :type name: str - :param location: The location of the new virtual machine or environment. - :type location: str - :param tags: A set of tags. The tags of the resource. - :type tags: dict[str, str] - :param bulk_creation_parameters: The number of virtual machine instances to create. - :type bulk_creation_parameters: ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key - for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine is to be created - without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual - machine. - :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine image. - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: ~datetime.datetime - :param allow_claim: Indicates whether another user can take ownership of the virtual machine. - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output - property only. Possible values include: "FromCustomImage", "FromGalleryImage", - "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains this virtual machine, - if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the virtual machine after - creation. - :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created. - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: A set of tags. The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key - for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine is to be created - without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual - machine. - :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine image. - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: ~datetime.datetime - :param allow_claim: Indicates whether another user can take ownership of the virtual machine. - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output - property only. Possible values include: "FromCustomImage", "FromGalleryImage", - "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains this virtual machine, - if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the virtual machine after - creation. - :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created. - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LabVirtualMachineFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_object_id = kwargs.get('owner_object_id', "dynamicValue") self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) self.size = kwargs.get('size', None) self.user_name = kwargs.get('user_name', None) self.password = kwargs.get('password', None) self.ssh_key = kwargs.get('ssh_key', None) self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) self.lab_subnet_name = kwargs.get('lab_subnet_name', None) self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', False) self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) self.gallery_image_reference = kwargs.get('gallery_image_reference', None) self.plan_id = kwargs.get('plan_id', None) self.network_interface = kwargs.get('network_interface', None) self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.allow_claim = kwargs.get('allow_claim', False) + self.storage_type = kwargs.get('storage_type', "labStorageType") self.environment_id = kwargs.get('environment_id', None) self.data_disk_parameters = kwargs.get('data_disk_parameters', None) self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(LabVirtualMachineFragment, self).__init__(**kwargs) class LabVirtualMachineList(msrest.serialization.Model): @@ -4062,27 +2906,6 @@ def __init__( self.linux_os_state = kwargs.get('linux_os_state', None) -class LinuxOsInfoFragment(msrest.serialization.Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, - DeprovisionApplied). Possible values include: "NonDeprovisioned", "DeprovisionRequested", - "DeprovisionApplied". - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) - - class NetworkInterfaceProperties(msrest.serialization.Model): """Properties of a network interface. @@ -4138,61 +2961,6 @@ def __init__( self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) -class NetworkInterfacePropertiesFragment(msrest.serialization.Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name or IP address - followed by the service port number for RDP (Remote Desktop Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name or IP address - followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for sharing a public IP - address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - - class NotificationChannel(Resource): """A notification. @@ -4210,8 +2978,8 @@ class NotificationChannel(Resource): :type tags: dict[str, str] :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). + :param email_recipient: The email recipient to send notifications to (can be a list of + semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). @@ -4273,27 +3041,10 @@ class NotificationChannelFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification (fallback for - unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, } def __init__( @@ -4301,11 +3052,6 @@ def __init__( **kwargs ): super(NotificationChannelFragment, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) class NotificationChannelList(msrest.serialization.Model): @@ -4341,8 +3087,8 @@ class NotificationSettings(msrest.serialization.Model): :type time_in_minutes: int :param webhook_url: The webhook URL to which the notification will be sent. :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). + :param email_recipient: The email recipient to send notifications to (can be a list of + semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). @@ -4369,44 +3115,6 @@ def __init__( self.notification_locale = kwargs.get('notification_locale', None) -class NotificationSettingsFragment(msrest.serialization.Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. Enabled, Disabled). - Possible values include: "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification (fallback for - unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - - class NotifyParameters(msrest.serialization.Model): """Properties for generating a Notification. @@ -4515,13 +3223,14 @@ class OperationResult(msrest.serialization.Model): :type status: str :param status_code: The status code for the operation. Possible values include: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", - "ResetContent", "PartialContent", "MultipleChoices", "MovedPermanently", "Redirect", - "SeeOther", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "BadRequest", - "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", - "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", - "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", - "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", - "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", + "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", + "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", + "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", + "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", + "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", + "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", + "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", + "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported". :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode :param error: Error details for the operation in case of a failure. @@ -4573,7 +3282,7 @@ class ParametersValueFileInfo(msrest.serialization.Model): :param file_name: File name. :type file_name: str :param parameters_value_info: Contents of the file. - :type parameters_value_info: object + :type parameters_value_info: any """ _attribute_map = { @@ -4696,33 +3405,10 @@ class PolicyFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, - etc. Possible values include: "UserOwnedLabVmCount", "UserOwnedLabPremiumVmCount", - "LabVmCount", "LabPremiumVmCount", "LabVmSize", "GalleryImage", "UserOwnedLabVmCountInSubnet", - "LabTargetCost", "EnvironmentTemplate", "ScheduleEditPermission". - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON - array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. AllowedValuesPolicy, - MaxValuePolicy). Possible values include: "AllowedValuesPolicy", "MaxValuePolicy". - :type evaluator_type: str or ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, } def __init__( @@ -4730,12 +3416,6 @@ def __init__( **kwargs ): super(PolicyFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) class PolicyList(msrest.serialization.Model): @@ -4831,29 +3511,6 @@ def __init__( self.backend_port = kwargs.get('backend_port', None) -class PortFragment(msrest.serialization.Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values include: "Tcp", "Udp". - :type transport_protocol: str or ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) - - class ProviderOperationResult(msrest.serialization.Model): """Result of the request to list REST API operations. @@ -5038,10 +3695,12 @@ def __init__( class ScheduleCreationParameter(msrest.serialization.Model): """Properties for creating a schedule. + Variables are only populated by the server, and will be ignored when sending a request. + :param name: The name of the virtual machine or environment. :type name: str - :param location: The location of the new virtual machine or environment. - :type location: str + :ivar location: The location of the new virtual machine or environment. + :vartype location: str :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] :param status: The status of the schedule (i.e. Enabled, Disabled). Possible values include: @@ -5066,6 +3725,10 @@ class ScheduleCreationParameter(msrest.serialization.Model): :type target_resource_id: str """ + _validation = { + 'location': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, @@ -5086,70 +3749,7 @@ def __init__( ): super(ScheduleCreationParameter, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - - -class ScheduleCreationParameterFragment(msrest.serialization.Model): - """Properties for creating a schedule. - - :param name: The name of the virtual machine or environment. - :type name: str - :param location: The location of the new virtual machine or environment. - :type location: str - :param tags: A set of tags. The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). Possible values include: - "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the week, specify the - weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the week, specify the - daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, specify the hourly - recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs. - :type target_resource_id: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) + self.location = None self.tags = kwargs.get('tags', None) self.status = kwargs.get('status', None) self.task_type = kwargs.get('task_type', None) @@ -5166,38 +3766,10 @@ class ScheduleFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). Possible values include: - "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the week, specify the - weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the week, specify the - daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, specify the hourly - recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs. - :type target_resource_id: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, } def __init__( @@ -5205,14 +3777,6 @@ def __init__( **kwargs ): super(ScheduleFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) class ScheduleList(msrest.serialization.Model): @@ -5295,13 +3859,10 @@ class SecretFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, } def __init__( @@ -5309,7 +3870,6 @@ def __init__( **kwargs ): super(SecretFragment, self).__init__(**kwargs) - self.value = kwargs.get('value', None) class SecretList(msrest.serialization.Model): @@ -5402,17 +3962,10 @@ class ServiceFabricFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's id. - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the service fabric - resource is present. - :type environment_id: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, } def __init__( @@ -5420,8 +3973,6 @@ def __init__( **kwargs ): super(ServiceFabricFragment, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) class ServiceFabricList(msrest.serialization.Model): @@ -5489,41 +4040,45 @@ def __init__( self.identity = kwargs.get('identity', None) -class SharedPublicIpAddressConfiguration(msrest.serialization.Model): - """Properties of a virtual machine that determine how it is connected to a load balancer. +class ServiceRunnerList(msrest.serialization.Model): + """The response of a list operation. - :param inbound_nat_rules: The incoming NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.devtestlabs.models.InboundNatRule] + :param value: Results of the list operation. + :type value: list[~azure.mgmt.devtestlabs.models.ServiceRunner] + :param next_link: Link for next set of results. + :type next_link: str """ _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + 'value': {'key': 'value', 'type': '[ServiceRunner]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, **kwargs ): - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + super(ServiceRunnerList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) -class SharedPublicIpAddressConfigurationFragment(msrest.serialization.Model): +class SharedPublicIpAddressConfiguration(msrest.serialization.Model): """Properties of a virtual machine that determine how it is connected to a load balancer. :param inbound_nat_rules: The incoming NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + :type inbound_nat_rules: list[~azure.mgmt.devtestlabs.models.InboundNatRule] """ _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, } def __init__( self, **kwargs ): - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) @@ -5622,34 +4177,6 @@ def __init__( self.allow_public_ip = kwargs.get('allow_public_ip', None) -class SubnetFragment(msrest.serialization.Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing public IP addresses - (i.e. Allow, Deny)). Possible values include: "Default", "Deny", "Allow". - :type allow_public_ip: str or ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) - - class SubnetOverride(msrest.serialization.Model): """Property overrides on a subnet of a virtual network. @@ -5695,51 +4222,6 @@ def __init__( self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) -class SubnetOverrideFragment(msrest.serialization.Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be used during virtual - machine creation (i.e. Allow, Deny). Possible values include: "Default", "Deny", "Allow". - :type use_in_vm_creation_permission: str or ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP addresses can be assigned - to virtual machines on this subnet (i.e. Allow, Deny). Possible values include: "Default", - "Deny", "Allow". - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual machines on this subnet - will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) - - class SubnetSharedPublicIpAddressConfiguration(msrest.serialization.Model): """Configuration for public IP address sharing. @@ -5759,25 +4241,6 @@ def __init__( self.allowed_ports = kwargs.get('allowed_ports', None) -class SubnetSharedPublicIpAddressConfigurationFragment(msrest.serialization.Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet are allowed to expose. - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) - - class TargetCostProperties(msrest.serialization.Model): """Properties of a cost target. @@ -5883,16 +4346,10 @@ class UserFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, } def __init__( @@ -5900,8 +4357,6 @@ def __init__( **kwargs ): super(UserFragment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) class UserIdentity(msrest.serialization.Model): @@ -5941,43 +4396,6 @@ def __init__( self.app_id = kwargs.get('app_id', None) -class UserIdentityFragment(msrest.serialization.Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the request. Service - principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the request. Not all users have - object Id. For CSP (reseller) scenarios for example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) - - class UserList(msrest.serialization.Model): """The response of a list operation. @@ -6024,29 +4442,6 @@ def __init__( self.key_vault_id = kwargs.get('key_vault_id', None) -class UserSecretStoreFragment(msrest.serialization.Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) - - class VirtualNetwork(Resource): """A virtual network. @@ -6127,23 +4522,10 @@ class VirtualNetworkFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource identifier of the virtual - network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, } def __init__( @@ -6151,10 +4533,6 @@ def __init__( **kwargs ): super(VirtualNetworkFragment, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.subnet_overrides = kwargs.get('subnet_overrides', None) class VirtualNetworkList(msrest.serialization.Model): @@ -6204,30 +4582,6 @@ def __init__( self.time = kwargs.get('time', None) -class WeekDetailsFragment(msrest.serialization.Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. Sunday, Monday, - Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) - - class WindowsOsInfo(msrest.serialization.Model): """Information about a Windows OS. @@ -6247,24 +4601,3 @@ def __init__( ): super(WindowsOsInfo, self).__init__(**kwargs) self.windows_os_state = kwargs.get('windows_os_state', None) - - -class WindowsOsInfoFragment(msrest.serialization.Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, - SysprepApplied). Possible values include: "NonSysprepped", "SysprepRequested", - "SysprepApplied". - :type windows_os_state: str or ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py index 7a314fbee25d..62b34f91e9cf 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union import msrest.serialization @@ -139,31 +139,19 @@ class ApplicableScheduleFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set at the lab or lab - resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at the lab or lab - resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - lab_vms_shutdown: Optional["ScheduleFragment"] = None, - lab_vms_startup: Optional["ScheduleFragment"] = None, **kwargs ): super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup class ApplyArtifactsRequest(msrest.serialization.Model): @@ -211,7 +199,7 @@ class ArmTemplate(Resource): :ivar icon: The URI to the icon of the ARM template. :vartype icon: str :ivar contents: The contents of the ARM template. - :vartype contents: object + :vartype contents: any :ivar created_date: The creation date of the armTemplate. :vartype created_date: ~datetime.datetime :ivar parameters_value_files_info: File name and parameter values information from all @@ -274,9 +262,9 @@ class ArmTemplateInfo(msrest.serialization.Model): """Information about a generated ARM template. :param template: The template's contents. - :type template: object + :type template: any :param parameters: The parameters of the ARM template. - :type parameters: object + :type parameters: any """ _attribute_map = { @@ -287,8 +275,8 @@ class ArmTemplateInfo(msrest.serialization.Model): def __init__( self, *, - template: Optional[object] = None, - parameters: Optional[object] = None, + template: Optional[Any] = None, + parameters: Optional[Any] = None, **kwargs ): super(ArmTemplateInfo, self).__init__(**kwargs) @@ -348,32 +336,6 @@ def __init__( self.value = value -class ArmTemplateParameterPropertiesFragment(msrest.serialization.Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value - - class Artifact(Resource): """An artifact. @@ -402,7 +364,7 @@ class Artifact(Resource): :ivar target_os_type: The artifact's target OS. :vartype target_os_type: str :ivar parameters: The artifact's parameters. - :vartype parameters: object + :vartype parameters: any :ivar created_date: The artifact's creation date. :vartype created_date: ~datetime.datetime """ @@ -486,37 +448,6 @@ def __init__( self.total_artifacts = total_artifacts -class ArtifactDeploymentStatusPropertiesFragment(msrest.serialization.Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__( - self, - *, - deployment_status: Optional[str] = None, - artifacts_applied: Optional[int] = None, - total_artifacts: Optional[int] = None, - **kwargs - ): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts - - class ArtifactInstallProperties(msrest.serialization.Model): """Properties of an artifact. @@ -568,57 +499,6 @@ def __init__( self.install_time = install_time -class ArtifactInstallPropertiesFragment(msrest.serialization.Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the virtual machine. - :type install_time: ~datetime.datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - artifact_id: Optional[str] = None, - artifact_title: Optional[str] = None, - parameters: Optional[List["ArtifactParameterPropertiesFragment"]] = None, - status: Optional[str] = None, - deployment_status_message: Optional[str] = None, - vm_extension_status_message: Optional[str] = None, - install_time: Optional[datetime.datetime] = None, - **kwargs - ): - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time - - class ArtifactList(msrest.serialization.Model): """The response of a list operation. @@ -671,32 +551,6 @@ def __init__( self.value = value -class ArtifactParameterPropertiesFragment(msrest.serialization.Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value - - class ArtifactSource(Resource): """Properties of an artifact source. @@ -716,7 +570,8 @@ class ArtifactSource(Resource): :type display_name: str :param uri: The artifact source's URI. :type uri: str - :param source_type: The artifact source's type. Possible values include: "VsoGit", "GitHub". + :param source_type: The artifact source's type. Possible values include: "VsoGit", "GitHub", + "StorageAccount". :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType :param folder_path: The folder containing artifacts. :type folder_path: str @@ -799,60 +654,19 @@ class ArtifactSourceFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: "VsoGit", "GitHub". - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: Enabled, Disabled). - Possible values include: "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - display_name: Optional[str] = None, - uri: Optional[str] = None, - source_type: Optional[Union[str, "SourceControlType"]] = None, - folder_path: Optional[str] = None, - arm_template_folder_path: Optional[str] = None, - branch_ref: Optional[str] = None, - security_token: Optional[str] = None, - status: Optional[Union[str, "EnableStatus"]] = None, **kwargs ): super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status class ArtifactSourceList(msrest.serialization.Model): @@ -906,7 +720,7 @@ def __init__( class AttachNewDataDiskOptions(msrest.serialization.Model): """Properties to attach new disk to the Virtual Machine. - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. :type disk_size_gi_b: int :param disk_name: The name of the disk to be attached. :type disk_name: str @@ -935,38 +749,6 @@ def __init__( self.disk_type = disk_type -class AttachNewDataDiskOptionsFragment(msrest.serialization.Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values - include: "Standard", "Premium", "StandardSSD". - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__( - self, - *, - disk_size_gi_b: Optional[int] = None, - disk_name: Optional[str] = None, - disk_type: Optional[Union[str, "StorageType"]] = None, - **kwargs - ): - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type - - class BulkCreationParameters(msrest.serialization.Model): """Parameters for creating multiple virtual machines as a single action. @@ -988,27 +770,6 @@ def __init__( self.instance_count = instance_count -class BulkCreationParametersFragment(msrest.serialization.Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__( - self, - *, - instance_count: Optional[int] = None, - **kwargs - ): - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = instance_count - - class CloudErrorBody(msrest.serialization.Model): """Body of an error from a REST request. @@ -1082,43 +843,6 @@ def __init__( self.disk_size_gi_b = disk_size_gi_b -class ComputeDataDiskFragment(msrest.serialization.Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the compute disk - resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - disk_uri: Optional[str] = None, - managed_disk_id: Optional[str] = None, - disk_size_gi_b: Optional[int] = None, - **kwargs - ): - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b - - class ComputeVmInstanceViewStatus(msrest.serialization.Model): """Status information about a virtual machine. @@ -1150,39 +874,8 @@ def __init__( self.message = message -class ComputeVmInstanceViewStatusFragment(msrest.serialization.Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - display_status: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message - - -class ComputeVmProperties(msrest.serialization.Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. +class ComputeVmProperties(msrest.serialization.Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. :param statuses: Gets the statuses of the virtual machine. :type statuses: list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] @@ -1232,57 +925,6 @@ def __init__( self.data_disks = data_disks -class ComputeVmPropertiesFragment(msrest.serialization.Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__( - self, - *, - statuses: Optional[List["ComputeVmInstanceViewStatusFragment"]] = None, - os_type: Optional[str] = None, - vm_size: Optional[str] = None, - network_interface_id: Optional[str] = None, - os_disk_id: Optional[str] = None, - data_disk_ids: Optional[List[str]] = None, - data_disks: Optional[List["ComputeDataDiskFragment"]] = None, - **kwargs - ): - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks - - class CostThresholdProperties(msrest.serialization.Model): """Properties of a cost threshold item. @@ -1436,67 +1078,19 @@ class CustomImageFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks present in the custom - image. - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to this custom image. - :type custom_image_plan: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying offer/plan has been - enabled for programmatic deployment. - :type is_plan_authorized: bool """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - vm: Optional["CustomImagePropertiesFromVmFragment"] = None, - vhd: Optional["CustomImagePropertiesCustomFragment"] = None, - description: Optional[str] = None, - author: Optional[str] = None, - managed_image_id: Optional[str] = None, - managed_snapshot_id: Optional[str] = None, - data_disk_storage_info: Optional[List["DataDiskStorageTypeInfoFragment"]] = None, - custom_image_plan: Optional["CustomImagePropertiesFromPlanFragment"] = None, - is_plan_authorized: Optional[bool] = None, **kwargs ): super(CustomImageFragment, self).__init__(tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized class CustomImageList(msrest.serialization.Model): @@ -1563,38 +1157,6 @@ def __init__( self.os_type = os_type -class CustomImagePropertiesCustomFragment(msrest.serialization.Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). Possible values include: - "Windows", "Linux", "None". - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__( - self, - *, - image_name: Optional[str] = None, - sys_prep: Optional[bool] = None, - os_type: Optional[Union[str, "CustomImageOsType"]] = None, - **kwargs - ): - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type - - class CustomImagePropertiesFromPlan(msrest.serialization.Model): """Properties for plan on a custom image. @@ -1628,39 +1190,6 @@ def __init__( self.offer = offer -class CustomImagePropertiesFromPlanFragment(msrest.serialization.Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan. - :type id: str - :param publisher: The publisher for the plan from the marketplace image the custom image is - derived from. - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom image is derived - from. - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - publisher: Optional[str] = None, - offer: Optional[str] = None, - **kwargs - ): - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer - - class CustomImagePropertiesFromVm(msrest.serialization.Model): """Properties for creating a custom image from a virtual machine. @@ -1692,37 +1221,6 @@ def __init__( self.linux_os_info = linux_os_info -class CustomImagePropertiesFromVmFragment(msrest.serialization.Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__( - self, - *, - source_vm_id: Optional[str] = None, - windows_os_info: Optional["WindowsOsInfoFragment"] = None, - linux_os_info: Optional["LinuxOsInfoFragment"] = None, - **kwargs - ): - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info - - class DataDiskProperties(msrest.serialization.Model): """Request body for adding a new or existing data disk to a virtual machine. @@ -1756,40 +1254,6 @@ def __init__( self.host_caching = host_caching -class DataDiskPropertiesFragment(msrest.serialization.Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new disk to the virtual - machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, ReadWrite). Possible - values include: "None", "ReadOnly", "ReadWrite". - :type host_caching: str or ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__( - self, - *, - attach_new_data_disk_options: Optional["AttachNewDataDiskOptionsFragment"] = None, - existing_lab_disk_id: Optional[str] = None, - host_caching: Optional[Union[str, "HostCachingOptions"]] = None, - **kwargs - ): - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching - - class DataDiskStorageTypeInfo(msrest.serialization.Model): """Storage information about the data disks present in the custom image. @@ -1817,33 +1281,6 @@ def __init__( self.storage_type = storage_type -class DataDiskStorageTypeInfoFragment(msrest.serialization.Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun. - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: "Standard", "Premium", - "StandardSSD". - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__( - self, - *, - lun: Optional[str] = None, - storage_type: Optional[Union[str, "StorageType"]] = None, - **kwargs - ): - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type - - class DayDetails(msrest.serialization.Model): """Properties of a daily schedule. @@ -1865,46 +1302,25 @@ def __init__( self.time = time -class DayDetailsFragment(msrest.serialization.Model): - """Properties of a daily schedule. +class DetachDataDiskProperties(msrest.serialization.Model): + """Request body for detaching data disk from a virtual machine. - :param time: The time of day the schedule will occur. - :type time: str + :param existing_lab_disk_id: Specifies the disk resource ID to detach from virtual machine. + :type existing_lab_disk_id: str """ _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, } def __init__( self, *, - time: Optional[str] = None, + existing_lab_disk_id: Optional[str] = None, **kwargs ): - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = time - - -class DetachDataDiskProperties(msrest.serialization.Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__( - self, - *, - existing_lab_disk_id: Optional[str] = None, - **kwargs - ): - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = existing_lab_disk_id + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = existing_lab_disk_id class DetachDiskProperties(msrest.serialization.Model): @@ -1946,7 +1362,7 @@ class Disk(Resource): :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values include: "Standard", "Premium", "StandardSSD". :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. + :param disk_size_gi_b: The size of the disk in Gibibytes. :type disk_size_gi_b: int :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. :type leased_by_lab_vm_id: str @@ -1954,6 +1370,8 @@ class Disk(Resource): :type disk_blob_name: str :param disk_uri: When backed by a blob, the URI of underlying blob. :type disk_uri: str + :param storage_account_id: When backed by a blob, the storage account where the blob is. + :type storage_account_id: str :ivar created_date: The creation date of the disk. :vartype created_date: ~datetime.datetime :param host_caching: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). @@ -1987,6 +1405,7 @@ class Disk(Resource): 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, @@ -2004,6 +1423,7 @@ def __init__( leased_by_lab_vm_id: Optional[str] = None, disk_blob_name: Optional[str] = None, disk_uri: Optional[str] = None, + storage_account_id: Optional[str] = None, host_caching: Optional[str] = None, managed_disk_id: Optional[str] = None, **kwargs @@ -2014,6 +1434,7 @@ def __init__( self.leased_by_lab_vm_id = leased_by_lab_vm_id self.disk_blob_name = disk_blob_name self.disk_uri = disk_uri + self.storage_account_id = storage_account_id self.created_date = None self.host_caching = host_caching self.managed_disk_id = managed_disk_id @@ -2026,56 +1447,19 @@ class DiskFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values - include: "Standard", "Premium", "StandardSSD". - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the compute disk - resource. - :type managed_disk_id: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - disk_type: Optional[Union[str, "StorageType"]] = None, - disk_size_gi_b: Optional[int] = None, - leased_by_lab_vm_id: Optional[str] = None, - disk_blob_name: Optional[str] = None, - disk_uri: Optional[str] = None, - host_caching: Optional[str] = None, - managed_disk_id: Optional[str] = None, **kwargs ): super(DiskFragment, self).__init__(tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id class DiskList(msrest.serialization.Model): @@ -2182,31 +1566,19 @@ class DtlEnvironmentFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource Manager template that - produced the environment. - :type arm_template_display_name: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - deployment_properties: Optional["EnvironmentDeploymentPropertiesFragment"] = None, - arm_template_display_name: Optional[str] = None, **kwargs ): super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name class DtlEnvironmentList(msrest.serialization.Model): @@ -2261,32 +1633,6 @@ def __init__( self.parameters = parameters -class EnvironmentDeploymentPropertiesFragment(msrest.serialization.Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__( - self, - *, - arm_template_id: Optional[str] = None, - parameters: Optional[List["ArmTemplateParameterPropertiesFragment"]] = None, - **kwargs - ): - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters - - class EvaluatePoliciesProperties(msrest.serialization.Model): """Properties for evaluating a policy set. @@ -2387,28 +1733,6 @@ def __init__( self.event_name = event_name -class EventFragment(msrest.serialization.Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled (i.e. AutoShutdown, - Cost). Possible values include: "AutoShutdown", "Cost". - :type event_name: str or ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__( - self, - *, - event_name: Optional[Union[str, "NotificationChannelEventType"]] = None, - **kwargs - ): - super(EventFragment, self).__init__(**kwargs) - self.event_name = event_name - - class ExportResourceUsageParameters(msrest.serialization.Model): """The parameters of the export operation. @@ -2463,32 +1787,6 @@ def __init__( self.name = name -class ExternalSubnetFragment(msrest.serialization.Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - **kwargs - ): - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = id - self.name = name - - class Formula(Resource): """A formula for creating a VM, specifying an image base and other parameters. @@ -2506,8 +1804,8 @@ class Formula(Resource): :type tags: dict[str, str] :param description: The description of the formula. :type description: str - :param author: The author of the formula. - :type author: str + :ivar author: The author of the formula. + :vartype author: str :param os_type: The OS type of the formula. :type os_type: str :ivar creation_date: The creation date of the formula. @@ -2526,6 +1824,7 @@ class Formula(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'author': {'readonly': True}, 'creation_date': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'unique_identifier': {'readonly': True}, @@ -2553,7 +1852,6 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, description: Optional[str] = None, - author: Optional[str] = None, os_type: Optional[str] = None, formula_content: Optional["LabVirtualMachineCreationParameter"] = None, vm: Optional["FormulaPropertiesFromVm"] = None, @@ -2561,7 +1859,7 @@ def __init__( ): super(Formula, self).__init__(location=location, tags=tags, **kwargs) self.description = description - self.author = author + self.author = None self.os_type = os_type self.creation_date = None self.formula_content = formula_content @@ -2575,45 +1873,19 @@ class FormulaFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - description: Optional[str] = None, - author: Optional[str] = None, - os_type: Optional[str] = None, - formula_content: Optional["LabVirtualMachineCreationParameterFragment"] = None, - vm: Optional["FormulaPropertiesFromVmFragment"] = None, **kwargs ): super(FormulaFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.formula_content = formula_content - self.vm = vm class FormulaList(msrest.serialization.Model): @@ -2663,27 +1935,6 @@ def __init__( self.lab_vm_id = lab_vm_id -class FormulaPropertiesFromVmFragment(msrest.serialization.Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__( - self, - *, - lab_vm_id: Optional[str] = None, - **kwargs - ): - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id - - class GalleryImage(Resource): """A gallery image. @@ -2833,47 +2084,6 @@ def __init__( self.version = version -class GalleryImageReferenceFragment(msrest.serialization.Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__( - self, - *, - offer: Optional[str] = None, - publisher: Optional[str] = None, - sku: Optional[str] = None, - os_type: Optional[str] = None, - version: Optional[str] = None, - **kwargs - ): - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version - - class GenerateArmTemplateRequest(msrest.serialization.Model): """Parameters for generating an ARM template for deploying artifacts. @@ -2975,32 +2185,12 @@ def __init__( self.minute = minute -class HourDetailsFragment(msrest.serialization.Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__( - self, - *, - minute: Optional[int] = None, - **kwargs - ): - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = minute - - class IdentityProperties(msrest.serialization.Model): """Properties of a managed identity. - :param type: Managed identity. - :type type: str + :param type: Managed identity. Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :type type: str or ~azure.mgmt.devtestlabs.models.ManagedIdentityType :param principal_id: The principal id of resource identity. :type principal_id: str :param tenant_id: The tenant identifier of resource. @@ -3019,7 +2209,7 @@ class IdentityProperties(msrest.serialization.Model): def __init__( self, *, - type: Optional[str] = None, + type: Optional[Union[str, "ManagedIdentityType"]] = None, principal_id: Optional[str] = None, tenant_id: Optional[str] = None, client_secret_url: Optional[str] = None, @@ -3093,43 +2283,10 @@ def __init__( self.backend_port = backend_port -class InboundNatRuleFragment(msrest.serialization.Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. Possible values include: - "Tcp", "Udp". - :type transport_protocol: str or ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound connection. Possible values - range between 1 and 65535, inclusive. If unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be redirected. - :type backend_port: int - """ +class Lab(Resource): + """A lab. - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__( - self, - *, - transport_protocol: Optional[Union[str, "TransportProtocol"]] = None, - frontend_port: Optional[int] = None, - backend_port: Optional[int] = None, - **kwargs - ): - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The identifier of the resource. :vartype id: str @@ -3336,49 +2493,6 @@ def __init__( self.unique_identifier = None -class LabAnnouncementPropertiesFragment(msrest.serialization.Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement. - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the UI. If left - empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. Possible values include: - "Enabled", "Disabled". - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null for never). - :type expiration_date: ~datetime.datetime - :param expired: Has this announcement expired?. - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - markdown: Optional[str] = None, - enabled: Optional[Union[str, "EnableStatus"]] = None, - expiration_date: Optional[datetime.datetime] = None, - expired: Optional[bool] = None, - **kwargs - ): - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired - - class LabCost(Resource): """A cost item. @@ -3528,68 +2642,19 @@ class LabFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either Premium or Standard. - Default is Premium. Possible values include: "Standard", "Premium", "StandardSSD". - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of artifact resource IDs that - should be applied on all Linux VM creations by default, prior to the artifacts specified by the - user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of artifact resource IDs that - should be applied on all Windows VM creations by default, prior to the artifacts specified by - the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data disks. - When its value is 'Enabled', creation of standard or premium data disks is allowed. - When its value is 'Disabled', only creation of standard data disks is allowed. Possible values - include: "Disabled", "Enabled". - :type premium_data_disks: str or ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user when provisioning an - environment. Possible values include: "Reader", "Contributor". - :type environment_permission: str or ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated with this lab. - :type announcement: ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with this lab. - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for experimental features. - :type extended_properties: dict[str, str] """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - lab_storage_type: Optional[Union[str, "StorageType"]] = None, - mandatory_artifacts_resource_ids_linux: Optional[List[str]] = None, - mandatory_artifacts_resource_ids_windows: Optional[List[str]] = None, - premium_data_disks: Optional[Union[str, "PremiumDataDisk"]] = None, - environment_permission: Optional[Union[str, "EnvironmentPermission"]] = None, - announcement: Optional["LabAnnouncementPropertiesFragment"] = None, - support: Optional["LabSupportPropertiesFragment"] = None, - extended_properties: Optional[Dict[str, str]] = None, **kwargs ): super(LabFragment, self).__init__(tags=tags, **kwargs) - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.extended_properties = extended_properties class LabList(msrest.serialization.Model): @@ -3707,34 +2772,6 @@ def __init__( self.markdown = markdown -class LabSupportPropertiesFragment(msrest.serialization.Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. Possible values - include: "Enabled", "Disabled". - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the UI. If left - empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__( - self, - *, - enabled: Optional[Union[str, "EnableStatus"]] = None, - markdown: Optional[str] = None, - **kwargs - ): - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown - - class LabVhd(msrest.serialization.Model): """Properties of a VHD in the lab. @@ -3803,18 +2840,18 @@ class LabVirtualMachine(Resource): :type owner_object_id: str :param owner_user_principal_name: The user principal name of the virtual machine owner. :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str + :ivar created_by_user_id: The object identifier of the creator of the virtual machine. + :vartype created_by_user_id: str + :ivar created_by_user: The email address of creator of the virtual machine. + :vartype created_by_user: str :param created_date: The creation date of the virtual machine. :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str + :ivar compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. + :vartype compute_id: str :param custom_image_id: The custom image identifier of the virtual machine. :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str + :ivar os_type: The OS type of the virtual machine. + :vartype os_type: str :param size: The size of the virtual machine. :type size: str :param user_name: The user name of the virtual machine. @@ -3826,8 +2863,8 @@ class LabVirtualMachine(Resource): :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key for authentication. :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str + :ivar fqdn: The fully-qualified domain name of the virtual machine. + :vartype fqdn: str :param lab_subnet_name: The lab subnet name of the virtual machine. :type lab_subnet_name: str :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. @@ -3837,8 +2874,8 @@ class LabVirtualMachine(Resource): :type disallow_public_ip_address: bool :param artifacts: The artifacts to be installed on the virtual machine. :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: + :ivar artifact_deployment_status: The artifact deployment status for the virtual machine. + :vartype artifact_deployment_status: ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual machine. @@ -3857,10 +2894,10 @@ class LabVirtualMachine(Resource): :type allow_claim: bool :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output + :ivar virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output property only. Possible values include: "FromCustomImage", "FromGalleryImage", "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or + :vartype virtual_machine_creation_source: str or ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource :param environment_id: The resource ID of the environment that contains this virtual machine, if any. @@ -3870,8 +2907,8 @@ class LabVirtualMachine(Resource): :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskProperties] :param schedule_parameters: Virtual Machine schedules to be created. :type schedule_parameters: list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str + :ivar last_known_power_state: Last known compute power state captured in DTL. + :vartype last_known_power_state: str :ivar provisioning_state: The provisioning status of the resource. :vartype provisioning_state: str :ivar unique_identifier: The unique immutable identifier of a resource (Guid). @@ -3882,8 +2919,16 @@ class LabVirtualMachine(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'created_by_user_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'compute_id': {'readonly': True}, + 'os_type': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'artifact_deployment_status': {'readonly': True}, 'compute_vm': {'readonly': True}, 'applicable_schedule': {'readonly': True}, + 'virtual_machine_creation_source': {'readonly': True}, + 'last_known_power_state': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'unique_identifier': {'readonly': True}, } @@ -3937,59 +2982,51 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, notes: Optional[str] = None, - owner_object_id: Optional[str] = None, + owner_object_id: Optional[str] = "dynamicValue", owner_user_principal_name: Optional[str] = None, - created_by_user_id: Optional[str] = None, - created_by_user: Optional[str] = None, created_date: Optional[datetime.datetime] = None, - compute_id: Optional[str] = None, custom_image_id: Optional[str] = None, - os_type: Optional[str] = None, size: Optional[str] = None, user_name: Optional[str] = None, password: Optional[str] = None, ssh_key: Optional[str] = None, is_authentication_with_ssh_key: Optional[bool] = None, - fqdn: Optional[str] = None, lab_subnet_name: Optional[str] = None, lab_virtual_network_id: Optional[str] = None, - disallow_public_ip_address: Optional[bool] = None, + disallow_public_ip_address: Optional[bool] = False, artifacts: Optional[List["ArtifactInstallProperties"]] = None, - artifact_deployment_status: Optional["ArtifactDeploymentStatusProperties"] = None, gallery_image_reference: Optional["GalleryImageReference"] = None, plan_id: Optional[str] = None, network_interface: Optional["NetworkInterfaceProperties"] = None, expiration_date: Optional[datetime.datetime] = None, - allow_claim: Optional[bool] = None, - storage_type: Optional[str] = None, - virtual_machine_creation_source: Optional[Union[str, "VirtualMachineCreationSource"]] = None, + allow_claim: Optional[bool] = False, + storage_type: Optional[str] = "labStorageType", environment_id: Optional[str] = None, data_disk_parameters: Optional[List["DataDiskProperties"]] = None, schedule_parameters: Optional[List["ScheduleCreationParameter"]] = None, - last_known_power_state: Optional[str] = None, **kwargs ): super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) self.notes = notes self.owner_object_id = owner_object_id self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user + self.created_by_user_id = None + self.created_by_user = None self.created_date = created_date - self.compute_id = compute_id + self.compute_id = None self.custom_image_id = custom_image_id - self.os_type = os_type + self.os_type = None self.size = size self.user_name = user_name self.password = password self.ssh_key = ssh_key self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn + self.fqdn = None self.lab_subnet_name = lab_subnet_name self.lab_virtual_network_id = lab_virtual_network_id self.disallow_public_ip_address = disallow_public_ip_address self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status + self.artifact_deployment_status = None self.gallery_image_reference = gallery_image_reference self.plan_id = plan_id self.compute_vm = None @@ -3998,11 +3035,11 @@ def __init__( self.expiration_date = expiration_date self.allow_claim = allow_claim self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source + self.virtual_machine_creation_source = None self.environment_id = environment_id self.data_disk_parameters = data_disk_parameters self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state + self.last_known_power_state = None self.provisioning_state = None self.unique_identifier = None @@ -4024,18 +3061,10 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type owner_object_id: str :param owner_user_principal_name: The user principal name of the virtual machine owner. :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str :param created_date: The creation date of the virtual machine. :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str :param custom_image_id: The custom image identifier of the virtual machine. :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str :param size: The size of the virtual machine. :type size: str :param user_name: The user name of the virtual machine. @@ -4047,8 +3076,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key for authentication. :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str :param lab_subnet_name: The lab subnet name of the virtual machine. :type lab_subnet_name: str :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. @@ -4058,9 +3085,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type disallow_public_ip_address: bool :param artifacts: The artifacts to be installed on the virtual machine. :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual machine. :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReference @@ -4074,11 +3098,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type allow_claim: bool :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output - property only. Possible values include: "FromCustomImage", "FromGalleryImage", - "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource :param environment_id: The resource ID of the environment that contains this virtual machine, if any. :type environment_id: str @@ -4087,8 +3106,6 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskProperties] :param schedule_parameters: Virtual Machine schedules to be created. :type schedule_parameters: list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str """ _attribute_map = { @@ -4099,34 +3116,26 @@ class LabVirtualMachineCreationParameter(msrest.serialization.Model): 'notes': {'key': 'properties.notes', 'type': 'str'}, 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, 'size': {'key': 'properties.size', 'type': 'str'}, 'user_name': {'key': 'properties.userName', 'type': 'str'}, 'password': {'key': 'properties.password', 'type': 'str'}, 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, 'plan_id': {'key': 'properties.planId', 'type': 'str'}, 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, } def __init__( @@ -4137,36 +3146,28 @@ def __init__( tags: Optional[Dict[str, str]] = None, bulk_creation_parameters: Optional["BulkCreationParameters"] = None, notes: Optional[str] = None, - owner_object_id: Optional[str] = None, + owner_object_id: Optional[str] = "dynamicValue", owner_user_principal_name: Optional[str] = None, - created_by_user_id: Optional[str] = None, - created_by_user: Optional[str] = None, created_date: Optional[datetime.datetime] = None, - compute_id: Optional[str] = None, custom_image_id: Optional[str] = None, - os_type: Optional[str] = None, size: Optional[str] = None, user_name: Optional[str] = None, password: Optional[str] = None, ssh_key: Optional[str] = None, is_authentication_with_ssh_key: Optional[bool] = None, - fqdn: Optional[str] = None, lab_subnet_name: Optional[str] = None, lab_virtual_network_id: Optional[str] = None, - disallow_public_ip_address: Optional[bool] = None, + disallow_public_ip_address: Optional[bool] = False, artifacts: Optional[List["ArtifactInstallProperties"]] = None, - artifact_deployment_status: Optional["ArtifactDeploymentStatusProperties"] = None, gallery_image_reference: Optional["GalleryImageReference"] = None, plan_id: Optional[str] = None, network_interface: Optional["NetworkInterfaceProperties"] = None, expiration_date: Optional[datetime.datetime] = None, - allow_claim: Optional[bool] = None, - storage_type: Optional[str] = None, - virtual_machine_creation_source: Optional[Union[str, "VirtualMachineCreationSource"]] = None, + allow_claim: Optional[bool] = False, + storage_type: Optional[str] = "labStorageType", environment_id: Optional[str] = None, data_disk_parameters: Optional[List["DataDiskProperties"]] = None, schedule_parameters: Optional[List["ScheduleCreationParameter"]] = None, - last_known_power_state: Optional[str] = None, **kwargs ): super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) @@ -4177,235 +3178,26 @@ def __init__( self.notes = notes self.owner_object_id = owner_object_id self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - - -class LabVirtualMachineCreationParameterFragment(msrest.serialization.Model): - """Properties for creating a virtual machine. - - :param name: The name of the virtual machine or environment. - :type name: str - :param location: The location of the new virtual machine or environment. - :type location: str - :param tags: A set of tags. The tags of the resource. - :type tags: dict[str, str] - :param bulk_creation_parameters: The number of virtual machine instances to create. - :type bulk_creation_parameters: ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key - for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine is to be created - without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual - machine. - :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine image. - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: ~datetime.datetime - :param allow_claim: Indicates whether another user can take ownership of the virtual machine. - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output - property only. Possible values include: "FromCustomImage", "FromGalleryImage", - "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains this virtual machine, - if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the virtual machine after - creation. - :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created. - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - bulk_creation_parameters: Optional["BulkCreationParametersFragment"] = None, - notes: Optional[str] = None, - owner_object_id: Optional[str] = None, - owner_user_principal_name: Optional[str] = None, - created_by_user_id: Optional[str] = None, - created_by_user: Optional[str] = None, - created_date: Optional[datetime.datetime] = None, - compute_id: Optional[str] = None, - custom_image_id: Optional[str] = None, - os_type: Optional[str] = None, - size: Optional[str] = None, - user_name: Optional[str] = None, - password: Optional[str] = None, - ssh_key: Optional[str] = None, - is_authentication_with_ssh_key: Optional[bool] = None, - fqdn: Optional[str] = None, - lab_subnet_name: Optional[str] = None, - lab_virtual_network_id: Optional[str] = None, - disallow_public_ip_address: Optional[bool] = None, - artifacts: Optional[List["ArtifactInstallPropertiesFragment"]] = None, - artifact_deployment_status: Optional["ArtifactDeploymentStatusPropertiesFragment"] = None, - gallery_image_reference: Optional["GalleryImageReferenceFragment"] = None, - plan_id: Optional[str] = None, - network_interface: Optional["NetworkInterfacePropertiesFragment"] = None, - expiration_date: Optional[datetime.datetime] = None, - allow_claim: Optional[bool] = None, - storage_type: Optional[str] = None, - virtual_machine_creation_source: Optional[Union[str, "VirtualMachineCreationSource"]] = None, - environment_id: Optional[str] = None, - data_disk_parameters: Optional[List["DataDiskPropertiesFragment"]] = None, - schedule_parameters: Optional[List["ScheduleCreationParameterFragment"]] = None, - last_known_power_state: Optional[str] = None, - **kwargs - ): - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.name = name - self.location = location - self.tags = tags - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user self.created_date = created_date - self.compute_id = compute_id self.custom_image_id = custom_image_id - self.os_type = os_type self.size = size self.user_name = user_name self.password = password self.ssh_key = ssh_key self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn self.lab_subnet_name = lab_subnet_name self.lab_virtual_network_id = lab_virtual_network_id self.disallow_public_ip_address = disallow_public_ip_address self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status self.gallery_image_reference = gallery_image_reference self.plan_id = plan_id self.network_interface = network_interface self.expiration_date = expiration_date self.allow_claim = allow_claim self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source self.environment_id = environment_id self.data_disk_parameters = data_disk_parameters self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state class LabVirtualMachineFragment(UpdateResource): @@ -4413,184 +3205,19 @@ class LabVirtualMachineFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: ~datetime.datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual machine uses an SSH key - for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine is to be created - without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image reference of the virtual - machine. - :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine image. - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: ~datetime.datetime - :param allow_claim: Indicates whether another user can take ownership of the virtual machine. - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab virtual machine. Output - property only. Possible values include: "FromCustomImage", "FromGalleryImage", - "FromSharedGalleryImage". - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains this virtual machine, - if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the virtual machine after - creation. - :type data_disk_parameters: list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created. - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in DTL. - :type last_known_power_state: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - notes: Optional[str] = None, - owner_object_id: Optional[str] = None, - owner_user_principal_name: Optional[str] = None, - created_by_user_id: Optional[str] = None, - created_by_user: Optional[str] = None, - created_date: Optional[datetime.datetime] = None, - compute_id: Optional[str] = None, - custom_image_id: Optional[str] = None, - os_type: Optional[str] = None, - size: Optional[str] = None, - user_name: Optional[str] = None, - password: Optional[str] = None, - ssh_key: Optional[str] = None, - is_authentication_with_ssh_key: Optional[bool] = None, - fqdn: Optional[str] = None, - lab_subnet_name: Optional[str] = None, - lab_virtual_network_id: Optional[str] = None, - disallow_public_ip_address: Optional[bool] = None, - artifacts: Optional[List["ArtifactInstallPropertiesFragment"]] = None, - artifact_deployment_status: Optional["ArtifactDeploymentStatusPropertiesFragment"] = None, - gallery_image_reference: Optional["GalleryImageReferenceFragment"] = None, - plan_id: Optional[str] = None, - network_interface: Optional["NetworkInterfacePropertiesFragment"] = None, - expiration_date: Optional[datetime.datetime] = None, - allow_claim: Optional[bool] = None, - storage_type: Optional[str] = None, - virtual_machine_creation_source: Optional[Union[str, "VirtualMachineCreationSource"]] = None, - environment_id: Optional[str] = None, - data_disk_parameters: Optional[List["DataDiskPropertiesFragment"]] = None, - schedule_parameters: Optional[List["ScheduleCreationParameterFragment"]] = None, - last_known_power_state: Optional[str] = None, **kwargs ): super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state class LabVirtualMachineList(msrest.serialization.Model): @@ -4628,109 +3255,21 @@ class LinuxOsInfo(msrest.serialization.Model): :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState """ - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__( - self, - *, - linux_os_state: Optional[Union[str, "LinuxOsState"]] = None, - **kwargs - ): - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = linux_os_state - - -class LinuxOsInfoFragment(msrest.serialization.Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, - DeprovisionApplied). Possible values include: "NonDeprovisioned", "DeprovisionRequested", - "DeprovisionApplied". - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__( - self, - *, - linux_os_state: Optional[Union[str, "LinuxOsState"]] = None, - **kwargs - ): - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = linux_os_state - - -class NetworkInterfaceProperties(msrest.serialization.Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name or IP address - followed by the service port number for RDP (Remote Desktop Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name or IP address - followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for sharing a public IP - address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, } def __init__( self, *, - virtual_network_id: Optional[str] = None, - subnet_id: Optional[str] = None, - public_ip_address_id: Optional[str] = None, - public_ip_address: Optional[str] = None, - private_ip_address: Optional[str] = None, - dns_name: Optional[str] = None, - rdp_authority: Optional[str] = None, - ssh_authority: Optional[str] = None, - shared_public_ip_address_configuration: Optional["SharedPublicIpAddressConfiguration"] = None, + linux_os_state: Optional[Union[str, "LinuxOsState"]] = None, **kwargs ): - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = linux_os_state -class NetworkInterfacePropertiesFragment(msrest.serialization.Model): +class NetworkInterfaceProperties(msrest.serialization.Model): """Properties of a network interface. :param virtual_network_id: The resource ID of the virtual network. @@ -4754,7 +3293,7 @@ class NetworkInterfacePropertiesFragment(msrest.serialization.Model): :param shared_public_ip_address_configuration: The configuration for sharing a public IP address across multiple virtual machines. :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration """ _attribute_map = { @@ -4766,7 +3305,7 @@ class NetworkInterfacePropertiesFragment(msrest.serialization.Model): 'dns_name': {'key': 'dnsName', 'type': 'str'}, 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, } def __init__( @@ -4780,10 +3319,10 @@ def __init__( dns_name: Optional[str] = None, rdp_authority: Optional[str] = None, ssh_authority: Optional[str] = None, - shared_public_ip_address_configuration: Optional["SharedPublicIpAddressConfigurationFragment"] = None, + shared_public_ip_address_configuration: Optional["SharedPublicIpAddressConfiguration"] = None, **kwargs ): - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + super(NetworkInterfaceProperties, self).__init__(**kwargs) self.virtual_network_id = virtual_network_id self.subnet_id = subnet_id self.public_ip_address_id = public_ip_address_id @@ -4812,8 +3351,8 @@ class NotificationChannel(Resource): :type tags: dict[str, str] :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). + :param email_recipient: The email recipient to send notifications to (can be a list of + semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). @@ -4883,46 +3422,19 @@ class NotificationChannelFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification (fallback for - unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - web_hook_url: Optional[str] = None, - email_recipient: Optional[str] = None, - notification_locale: Optional[str] = None, - description: Optional[str] = None, - events: Optional[List["EventFragment"]] = None, **kwargs ): super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events class NotificationChannelList(msrest.serialization.Model): @@ -4961,8 +3473,8 @@ class NotificationSettings(msrest.serialization.Model): :type time_in_minutes: int :param webhook_url: The webhook URL to which the notification will be sent. :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). + :param email_recipient: The email recipient to send notifications to (can be a list of + semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). @@ -4995,50 +3507,6 @@ def __init__( self.notification_locale = notification_locale -class NotificationSettingsFragment(msrest.serialization.Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. Enabled, Disabled). - Possible values include: "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can be a list of semi- - colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification (fallback for - unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "EnableStatus"]] = None, - time_in_minutes: Optional[int] = None, - webhook_url: Optional[str] = None, - email_recipient: Optional[str] = None, - notification_locale: Optional[str] = None, - **kwargs - ): - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - - class NotifyParameters(msrest.serialization.Model): """Properties for generating a Notification. @@ -5161,13 +3629,14 @@ class OperationResult(msrest.serialization.Model): :type status: str :param status_code: The status code for the operation. Possible values include: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", - "ResetContent", "PartialContent", "MultipleChoices", "MovedPermanently", "Redirect", - "SeeOther", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "BadRequest", - "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", - "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", - "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", - "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", - "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", + "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", + "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", + "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", + "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", + "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", + "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", + "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", + "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported". :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode :param error: Error details for the operation in case of a failure. @@ -5226,7 +3695,7 @@ class ParametersValueFileInfo(msrest.serialization.Model): :param file_name: File name. :type file_name: str :param parameters_value_info: Contents of the file. - :type parameters_value_info: object + :type parameters_value_info: any """ _attribute_map = { @@ -5238,7 +3707,7 @@ def __init__( self, *, file_name: Optional[str] = None, - parameters_value_info: Optional[object] = None, + parameters_value_info: Optional[Any] = None, **kwargs ): super(ParametersValueFileInfo, self).__init__(**kwargs) @@ -5363,54 +3832,19 @@ class PolicyFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, - etc. Possible values include: "UserOwnedLabVmCount", "UserOwnedLabPremiumVmCount", - "LabVmCount", "LabPremiumVmCount", "LabVmSize", "GalleryImage", "UserOwnedLabVmCountInSubnet", - "LabTargetCost", "EnvironmentTemplate", "ScheduleEditPermission". - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON - array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. AllowedValuesPolicy, - MaxValuePolicy). Possible values include: "AllowedValuesPolicy", "MaxValuePolicy". - :type evaluator_type: str or ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - description: Optional[str] = None, - status: Optional[Union[str, "PolicyStatus"]] = None, - fact_name: Optional[Union[str, "PolicyFactName"]] = None, - fact_data: Optional[str] = None, - threshold: Optional[str] = None, - evaluator_type: Optional[Union[str, "PolicyEvaluatorType"]] = None, **kwargs ): super(PolicyFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type class PolicyList(msrest.serialization.Model): @@ -5518,32 +3952,6 @@ def __init__( self.backend_port = backend_port -class PortFragment(msrest.serialization.Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values include: "Tcp", "Udp". - :type transport_protocol: str or ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__( - self, - *, - transport_protocol: Optional[Union[str, "TransportProtocol"]] = None, - backend_port: Optional[int] = None, - **kwargs - ): - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port - - class ProviderOperationResult(msrest.serialization.Model): """Result of the request to list REST API operations. @@ -5748,10 +4156,12 @@ def __init__( class ScheduleCreationParameter(msrest.serialization.Model): """Properties for creating a schedule. + Variables are only populated by the server, and will be ignored when sending a request. + :param name: The name of the virtual machine or environment. :type name: str - :param location: The location of the new virtual machine or environment. - :type location: str + :ivar location: The location of the new virtual machine or environment. + :vartype location: str :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] :param status: The status of the schedule (i.e. Enabled, Disabled). Possible values include: @@ -5776,6 +4186,10 @@ class ScheduleCreationParameter(msrest.serialization.Model): :type target_resource_id: str """ + _validation = { + 'location': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, @@ -5794,7 +4208,6 @@ def __init__( self, *, name: Optional[str] = None, - location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, status: Optional[Union[str, "EnableStatus"]] = None, task_type: Optional[str] = None, @@ -5808,82 +4221,7 @@ def __init__( ): super(ScheduleCreationParameter, self).__init__(**kwargs) self.name = name - self.location = location - self.tags = tags - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - - -class ScheduleCreationParameterFragment(msrest.serialization.Model): - """Properties for creating a schedule. - - :param name: The name of the virtual machine or environment. - :type name: str - :param location: The location of the new virtual machine or environment. - :type location: str - :param tags: A set of tags. The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). Possible values include: - "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the week, specify the - weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the week, specify the - daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, specify the hourly - recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs. - :type target_resource_id: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - status: Optional[Union[str, "EnableStatus"]] = None, - task_type: Optional[str] = None, - weekly_recurrence: Optional["WeekDetailsFragment"] = None, - daily_recurrence: Optional["DayDetailsFragment"] = None, - hourly_recurrence: Optional["HourDetailsFragment"] = None, - time_zone_id: Optional[str] = None, - notification_settings: Optional["NotificationSettingsFragment"] = None, - target_resource_id: Optional[str] = None, - **kwargs - ): - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.name = name - self.location = location + self.location = None self.tags = tags self.status = status self.task_type = task_type @@ -5900,63 +4238,19 @@ class ScheduleFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). Possible values include: - "Enabled", "Disabled". - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the week, specify the - weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the week, specify the - daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, specify the hourly - recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs. - :type target_resource_id: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - status: Optional[Union[str, "EnableStatus"]] = None, - task_type: Optional[str] = None, - weekly_recurrence: Optional["WeekDetailsFragment"] = None, - daily_recurrence: Optional["DayDetailsFragment"] = None, - hourly_recurrence: Optional["HourDetailsFragment"] = None, - time_zone_id: Optional[str] = None, - notification_settings: Optional["NotificationSettingsFragment"] = None, - target_resource_id: Optional[str] = None, **kwargs ): super(ScheduleFragment, self).__init__(tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id class ScheduleList(msrest.serialization.Model): @@ -6046,24 +4340,19 @@ class SecretFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - value: Optional[str] = None, **kwargs ): super(SecretFragment, self).__init__(tags=tags, **kwargs) - self.value = value class SecretList(msrest.serialization.Model): @@ -6164,30 +4453,19 @@ class ServiceFabricFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's id. - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the service fabric - resource is present. - :type environment_id: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - external_service_fabric_id: Optional[str] = None, - environment_id: Optional[str] = None, **kwargs ): super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id class ServiceFabricList(msrest.serialization.Model): @@ -6262,45 +4540,50 @@ def __init__( self.identity = identity -class SharedPublicIpAddressConfiguration(msrest.serialization.Model): - """Properties of a virtual machine that determine how it is connected to a load balancer. +class ServiceRunnerList(msrest.serialization.Model): + """The response of a list operation. - :param inbound_nat_rules: The incoming NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.devtestlabs.models.InboundNatRule] + :param value: Results of the list operation. + :type value: list[~azure.mgmt.devtestlabs.models.ServiceRunner] + :param next_link: Link for next set of results. + :type next_link: str """ _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + 'value': {'key': 'value', 'type': '[ServiceRunner]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, - inbound_nat_rules: Optional[List["InboundNatRule"]] = None, + value: Optional[List["ServiceRunner"]] = None, + next_link: Optional[str] = None, **kwargs ): - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules + super(ServiceRunnerList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link -class SharedPublicIpAddressConfigurationFragment(msrest.serialization.Model): +class SharedPublicIpAddressConfiguration(msrest.serialization.Model): """Properties of a virtual machine that determine how it is connected to a load balancer. :param inbound_nat_rules: The incoming NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + :type inbound_nat_rules: list[~azure.mgmt.devtestlabs.models.InboundNatRule] """ _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, } def __init__( self, *, - inbound_nat_rules: Optional[List["InboundNatRuleFragment"]] = None, + inbound_nat_rules: Optional[List["InboundNatRule"]] = None, **kwargs ): - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) self.inbound_nat_rules = inbound_nat_rules @@ -6417,38 +4700,6 @@ def __init__( self.allow_public_ip = allow_public_ip -class SubnetFragment(msrest.serialization.Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing public IP addresses - (i.e. Allow, Deny)). Possible values include: "Default", "Deny", "Allow". - :type allow_public_ip: str or ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__( - self, - *, - resource_id: Optional[str] = None, - lab_subnet_name: Optional[str] = None, - allow_public_ip: Optional[Union[str, "UsagePermissionType"]] = None, - **kwargs - ): - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip - - class SubnetOverride(msrest.serialization.Model): """Property overrides on a subnet of a virtual network. @@ -6501,58 +4752,6 @@ def __init__( self.virtual_network_pool_name = virtual_network_pool_name -class SubnetOverrideFragment(msrest.serialization.Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be used during virtual - machine creation (i.e. Allow, Deny). Possible values include: "Default", "Deny", "Allow". - :type use_in_vm_creation_permission: str or ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP addresses can be assigned - to virtual machines on this subnet (i.e. Allow, Deny). Possible values include: "Default", - "Deny", "Allow". - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual machines on this subnet - will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__( - self, - *, - resource_id: Optional[str] = None, - lab_subnet_name: Optional[str] = None, - use_in_vm_creation_permission: Optional[Union[str, "UsagePermissionType"]] = None, - use_public_ip_address_permission: Optional[Union[str, "UsagePermissionType"]] = None, - shared_public_ip_address_configuration: Optional["SubnetSharedPublicIpAddressConfigurationFragment"] = None, - virtual_network_pool_name: Optional[str] = None, - **kwargs - ): - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name - - class SubnetSharedPublicIpAddressConfiguration(msrest.serialization.Model): """Configuration for public IP address sharing. @@ -6574,27 +4773,6 @@ def __init__( self.allowed_ports = allowed_ports -class SubnetSharedPublicIpAddressConfigurationFragment(msrest.serialization.Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet are allowed to expose. - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__( - self, - *, - allowed_ports: Optional[List["PortFragment"]] = None, - **kwargs - ): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = allowed_ports - - class TargetCostProperties(msrest.serialization.Model): """Properties of a cost target. @@ -6712,29 +4890,19 @@ class UserFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - identity: Optional["UserIdentityFragment"] = None, - secret_store: Optional["UserSecretStoreFragment"] = None, **kwargs ): super(UserFragment, self).__init__(tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store class UserIdentity(msrest.serialization.Model): @@ -6780,49 +4948,6 @@ def __init__( self.app_id = app_id -class UserIdentityFragment(msrest.serialization.Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the request. Service - principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the request. Not all users have - object Id. For CSP (reseller) scenarios for example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__( - self, - *, - principal_name: Optional[str] = None, - principal_id: Optional[str] = None, - tenant_id: Optional[str] = None, - object_id: Optional[str] = None, - app_id: Optional[str] = None, - **kwargs - ): - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id - - class UserList(msrest.serialization.Model): """The response of a list operation. @@ -6875,32 +5000,6 @@ def __init__( self.key_vault_id = key_vault_id -class UserSecretStoreFragment(msrest.serialization.Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__( - self, - *, - key_vault_uri: Optional[str] = None, - key_vault_id: Optional[str] = None, - **kwargs - ): - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id - - class VirtualNetwork(Resource): """A virtual network. @@ -6988,40 +5087,19 @@ class VirtualNetworkFragment(UpdateResource): :param tags: A set of tags. The tags of the resource. :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource identifier of the virtual - network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - allowed_subnets: Optional[List["SubnetFragment"]] = None, - description: Optional[str] = None, - external_provider_resource_id: Optional[str] = None, - subnet_overrides: Optional[List["SubnetOverrideFragment"]] = None, **kwargs ): super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.subnet_overrides = subnet_overrides class VirtualNetworkList(msrest.serialization.Model): @@ -7077,33 +5155,6 @@ def __init__( self.time = time -class WeekDetailsFragment(msrest.serialization.Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. Sunday, Monday, - Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__( - self, - *, - weekdays: Optional[List[str]] = None, - time: Optional[str] = None, - **kwargs - ): - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time - - class WindowsOsInfo(msrest.serialization.Model): """Information about a Windows OS. @@ -7125,26 +5176,3 @@ def __init__( ): super(WindowsOsInfo, self).__init__(**kwargs) self.windows_os_state = windows_os_state - - -class WindowsOsInfoFragment(msrest.serialization.Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, - SysprepApplied). Possible values include: "NonSysprepped", "SysprepRequested", - "SysprepApplied". - :type windows_os_state: str or ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__( - self, - *, - windows_os_state: Optional[Union[str, "WindowsOsState"]] = None, - **kwargs - ): - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py index 3a2397e3e372..defc88e473dc 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py @@ -349,7 +349,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - artifact_source, # type: "_models.ArtifactSourceFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.ArtifactSource" @@ -361,8 +361,8 @@ def update( :type lab_name: str :param name: The name of the artifact source. :type name: str - :param artifact_source: Properties of an artifact source. - :type artifact_source: ~azure.mgmt.devtestlabs.models.ArtifactSourceFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: ArtifactSource, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.ArtifactSource @@ -373,6 +373,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _artifact_source = _models.ArtifactSourceFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -397,7 +399,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(artifact_source, 'ArtifactSourceFragment') + body_content = self._serialize.body(_artifact_source, 'ArtifactSourceFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py index af13121d1c49..31f59dae6141 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py @@ -292,8 +292,8 @@ def begin_create_or_update( :type custom_image: ~azure.mgmt.devtestlabs.models.CustomImage :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: True for ARMPolling, False for no polling, or a - polling object for 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 CustomImage or the result of cls(response) @@ -413,8 +413,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -470,7 +470,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - custom_image, # type: "_models.CustomImageFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.CustomImage" @@ -482,8 +482,8 @@ def update( :type lab_name: str :param name: The name of the custom image. :type name: str - :param custom_image: A custom image. - :type custom_image: ~azure.mgmt.devtestlabs.models.CustomImageFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomImage, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.CustomImage @@ -494,6 +494,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _custom_image = _models.CustomImageFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -518,7 +520,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(custom_image, 'CustomImageFragment') + body_content = self._serialize.body(_custom_image, 'CustomImageFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py index 044e1fa10005..896efe6ba6b2 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py @@ -305,8 +305,8 @@ def begin_create_or_update( :type disk: ~azure.mgmt.devtestlabs.models.Disk :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: True for ARMPolling, False for no polling, or a - polling object for 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 Disk or the result of cls(response) @@ -433,8 +433,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -493,7 +493,7 @@ def update( lab_name, # type: str user_name, # type: str name, # type: str - disk, # type: "_models.DiskFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Disk" @@ -507,8 +507,8 @@ def update( :type user_name: str :param name: The name of the disk. :type name: str - :param disk: A Disk. - :type disk: ~azure.mgmt.devtestlabs.models.DiskFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Disk, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Disk @@ -519,6 +519,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _disk = _models.DiskFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -544,7 +546,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(disk, 'DiskFragment') + body_content = self._serialize.body(_disk, 'DiskFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -645,8 +647,8 @@ def begin_attach( :type leased_by_lab_vm_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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -782,8 +784,8 @@ def begin_detach( :type leased_by_lab_vm_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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py index e3da2d9c3b4e..d7ef84503ddd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py @@ -305,8 +305,8 @@ def begin_create_or_update( :type dtl_environment: ~azure.mgmt.devtestlabs.models.DtlEnvironment :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: True for ARMPolling, False for no polling, or a - polling object for 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 DtlEnvironment or the result of cls(response) @@ -433,8 +433,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -493,7 +493,7 @@ def update( lab_name, # type: str user_name, # type: str name, # type: str - dtl_environment, # type: "_models.DtlEnvironmentFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.DtlEnvironment" @@ -507,8 +507,8 @@ def update( :type user_name: str :param name: The name of the environment. :type name: str - :param dtl_environment: An environment, which is essentially an ARM template deployment. - :type dtl_environment: ~azure.mgmt.devtestlabs.models.DtlEnvironmentFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: DtlEnvironment, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.DtlEnvironment @@ -519,6 +519,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _dtl_environment = _models.DtlEnvironmentFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -544,7 +546,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(dtl_environment, 'DtlEnvironmentFragment') + body_content = self._serialize.body(_dtl_environment, 'DtlEnvironmentFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py index eefb750c3900..68a663716b8e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py @@ -292,8 +292,8 @@ def begin_create_or_update( :type formula: ~azure.mgmt.devtestlabs.models.Formula :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: True for ARMPolling, False for no polling, or a - polling object for 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 Formula or the result of cls(response) @@ -413,7 +413,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - formula, # type: "_models.FormulaFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Formula" @@ -425,8 +425,8 @@ def update( :type lab_name: str :param name: The name of the formula. :type name: str - :param formula: A formula for creating a VM, specifying an image base and other parameters. - :type formula: ~azure.mgmt.devtestlabs.models.FormulaFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Formula, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Formula @@ -437,6 +437,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _formula = _models.FormulaFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -461,7 +463,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(formula, 'FormulaFragment') + body_content = self._serialize.body(_formula, 'FormulaFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py index 8f8cb436844a..296d3b28cafc 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py @@ -422,7 +422,7 @@ def update( self, resource_group_name, # type: str name, # type: str - schedule, # type: "_models.ScheduleFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Schedule" @@ -432,8 +432,8 @@ def update( :type resource_group_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -444,6 +444,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -467,7 +469,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -545,8 +547,8 @@ def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -672,8 +674,8 @@ def begin_retarget( :type target_resource_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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py index e164f414ce5f..8d5274bb1f8b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py @@ -368,8 +368,8 @@ def begin_create_or_update( :type lab: ~azure.mgmt.devtestlabs.models.Lab :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: True for ARMPolling, False for no polling, or a - polling object for 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 Lab or the result of cls(response) @@ -482,8 +482,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -536,7 +536,7 @@ def update( self, resource_group_name, # type: str name, # type: str - lab, # type: "_models.LabFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Lab" @@ -546,8 +546,8 @@ def update( :type resource_group_name: str :param name: The name of the lab. :type name: str - :param lab: A lab. - :type lab: ~azure.mgmt.devtestlabs.models.LabFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Lab, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Lab @@ -558,6 +558,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _lab = _models.LabFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -581,7 +583,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(lab, 'LabFragment') + body_content = self._serialize.body(_lab, 'LabFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -660,8 +662,8 @@ def begin_claim_any_vm( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -779,8 +781,8 @@ def begin_create_environment( :type lab_virtual_machine_creation_parameter: ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -908,8 +910,8 @@ def begin_export_resource_usage( :type usage_start_date: ~datetime.datetime :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1106,8 +1108,8 @@ def begin_import_virtual_machine( :type destination_virtual_machine_name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py index 16808e656def..2de820eaec10 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py @@ -349,7 +349,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - notification_channel, # type: "_models.NotificationChannelFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.NotificationChannel" @@ -361,8 +361,8 @@ def update( :type lab_name: str :param name: The name of the notification channel. :type name: str - :param notification_channel: A notification. - :type notification_channel: ~azure.mgmt.devtestlabs.models.NotificationChannelFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: NotificationChannel, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.NotificationChannel @@ -373,6 +373,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _notification_channel = _models.NotificationChannelFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -397,7 +399,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(notification_channel, 'NotificationChannelFragment') + body_content = self._serialize.body(_notification_channel, 'NotificationChannelFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py index 92225c143fa2..7fb14fdeaed0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py @@ -17,7 +17,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -91,11 +91,15 @@ def get( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('OperationResult', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('OperationResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('OperationResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py index 98a56b3a700b..2942d8b49cdd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py @@ -366,7 +366,7 @@ def update( lab_name, # type: str policy_set_name, # type: str name, # type: str - policy, # type: "_models.PolicyFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Policy" @@ -380,8 +380,8 @@ def update( :type policy_set_name: str :param name: The name of the policy. :type name: str - :param policy: A Policy. - :type policy: ~azure.mgmt.devtestlabs.models.PolicyFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Policy, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Policy @@ -392,6 +392,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _policy = _models.PolicyFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -417,7 +419,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(policy, 'PolicyFragment') + body_content = self._serialize.body(_policy, 'PolicyFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py index 04e61b479eb6..519ad150f75c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py @@ -351,7 +351,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - schedule, # type: "_models.ScheduleFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Schedule" @@ -363,8 +363,8 @@ def update( :type lab_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -375,6 +375,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -399,7 +401,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -482,8 +484,8 @@ def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py index c5dac71c3edd..eab06a1257b2 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py @@ -305,8 +305,8 @@ def begin_create_or_update( :type secret: ~azure.mgmt.devtestlabs.models.Secret :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: True for ARMPolling, False for no polling, or a - polling object for 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 Secret or the result of cls(response) @@ -434,7 +434,6 @@ def update( user_name, # type: str name, # type: str tags=None, # type: Optional[Dict[str, str]] - value=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "_models.Secret" @@ -450,8 +449,6 @@ def update( :type name: str :param tags: The tags of the resource. :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Secret, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Secret @@ -463,7 +460,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - _secret = _models.SecretFragment(tags=tags, value=value) + _secret = _models.SecretFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py index fcedae3b5264..6469fd5abebd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py @@ -385,7 +385,7 @@ def update( user_name, # type: str service_fabric_name, # type: str name, # type: str - schedule, # type: "_models.ScheduleFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Schedule" @@ -401,8 +401,8 @@ def update( :type service_fabric_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -413,6 +413,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -439,7 +441,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -532,8 +534,8 @@ def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py index b9f877ec224e..055e71362d35 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py @@ -305,8 +305,8 @@ def begin_create_or_update( :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric :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: True for ARMPolling, False for no polling, or a - polling object for 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 ServiceFabric or the result of cls(response) @@ -433,8 +433,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -493,7 +493,7 @@ def update( lab_name, # type: str user_name, # type: str name, # type: str - service_fabric, # type: "_models.ServiceFabricFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.ServiceFabric" @@ -507,8 +507,8 @@ def update( :type user_name: str :param name: The name of the service fabric. :type name: str - :param service_fabric: A Service Fabric. - :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabricFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceFabric, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.ServiceFabric @@ -519,6 +519,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _service_fabric = _models.ServiceFabricFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -544,7 +546,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(service_fabric, 'ServiceFabricFragment') + body_content = self._serialize.body(_service_fabric, 'ServiceFabricFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -699,8 +701,8 @@ def begin_start( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -823,8 +825,8 @@ def begin_stop( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py index 25168f7c139c..79b9a0c0617b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py @@ -292,8 +292,8 @@ def begin_create_or_update( :type user: ~azure.mgmt.devtestlabs.models.User :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: True for ARMPolling, False for no polling, or a - polling object for 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 User or the result of cls(response) @@ -413,8 +413,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -470,7 +470,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - user, # type: "_models.UserFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.User" @@ -482,8 +482,8 @@ def update( :type lab_name: str :param name: The name of the user profile. :type name: str - :param user: Profile of a lab user. - :type user: ~azure.mgmt.devtestlabs.models.UserFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.User @@ -494,6 +494,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _user = _models.UserFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -518,7 +520,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(user, 'UserFragment') + body_content = self._serialize.body(_user, 'UserFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py index aebc3a28c782..5867dc458d68 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py @@ -368,7 +368,7 @@ def update( lab_name, # type: str virtual_machine_name, # type: str name, # type: str - schedule, # type: "_models.ScheduleFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.Schedule" @@ -382,8 +382,8 @@ def update( :type virtual_machine_name: str :param name: The name of the schedule. :type name: str - :param schedule: A schedule. - :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: Schedule, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.Schedule @@ -394,6 +394,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _schedule = _models.ScheduleFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -419,7 +421,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(schedule, 'ScheduleFragment') + body_content = self._serialize.body(_schedule, 'ScheduleFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -507,8 +509,8 @@ def begin_execute( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py index 626ea2158dfe..4230451c8dda 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py @@ -294,8 +294,8 @@ def begin_create_or_update( :type lab_virtual_machine: ~azure.mgmt.devtestlabs.models.LabVirtualMachine :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: True for ARMPolling, False for no polling, or a - polling object for 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 LabVirtualMachine or the result of cls(response) @@ -415,8 +415,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -472,7 +472,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - lab_virtual_machine, # type: "_models.LabVirtualMachineFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.LabVirtualMachine" @@ -484,8 +484,8 @@ def update( :type lab_name: str :param name: The name of the virtual machine. :type name: str - :param lab_virtual_machine: A virtual machine. - :type lab_virtual_machine: ~azure.mgmt.devtestlabs.models.LabVirtualMachineFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: LabVirtualMachine, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.LabVirtualMachine @@ -496,6 +496,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _lab_virtual_machine = _models.LabVirtualMachineFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -520,7 +522,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(lab_virtual_machine, 'LabVirtualMachineFragment') + body_content = self._serialize.body(_lab_virtual_machine, 'LabVirtualMachineFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -614,8 +616,8 @@ def begin_add_data_disk( :type data_disk_properties: ~azure.mgmt.devtestlabs.models.DataDiskProperties :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -743,8 +745,8 @@ def begin_apply_artifacts( :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] :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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -861,8 +863,8 @@ def begin_claim( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -990,8 +992,8 @@ def begin_detach_data_disk( :type existing_lab_disk_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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1234,8 +1236,8 @@ def begin_redeploy( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1362,8 +1364,8 @@ def begin_resize( :type size: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1480,8 +1482,8 @@ def begin_restart( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1597,8 +1599,8 @@ def begin_start( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1714,8 +1716,8 @@ def begin_stop( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1832,8 +1834,8 @@ def begin_transfer_disks( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -1949,8 +1951,8 @@ def begin_un_claim( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py index 578ae36c52fe..0971d8f62e34 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py @@ -292,8 +292,8 @@ def begin_create_or_update( :type virtual_network: ~azure.mgmt.devtestlabs.models.VirtualNetwork :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: True for ARMPolling, False for no polling, or a - polling object for 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 VirtualNetwork or the result of cls(response) @@ -413,8 +413,8 @@ def begin_delete( :type name: 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: True for ARMPolling, False for no polling, or a - polling object for 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) @@ -470,7 +470,7 @@ def update( resource_group_name, # type: str lab_name, # type: str name, # type: str - virtual_network, # type: "_models.VirtualNetworkFragment" + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): # type: (...) -> "_models.VirtualNetwork" @@ -482,8 +482,8 @@ def update( :type lab_name: str :param name: The name of the virtual network. :type name: str - :param virtual_network: A virtual network. - :type virtual_network: ~azure.mgmt.devtestlabs.models.VirtualNetworkFragment + :param tags: The tags of the resource. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) :rtype: ~azure.mgmt.devtestlabs.models.VirtualNetwork @@ -494,6 +494,8 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _virtual_network = _models.VirtualNetworkFragment(tags=tags) api_version = "2018-09-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -518,7 +520,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(virtual_network, 'VirtualNetworkFragment') + body_content = self._serialize.body(_virtual_network, 'VirtualNetworkFragment') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)