From a242b304ff9f26358fef7890be0076dcf2965b0c Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 24 Jun 2020 01:42:00 +0000 Subject: [PATCH] Generated from 26e10fdf6dd53c10883de3fa638d82e833ef1143 updated readme files --- .../azure-mgmt-containerinstance/README.md | 30 +- .../azure/mgmt/containerinstance/__init__.py | 7 +- .../mgmt/containerinstance/_configuration.py | 50 + .../_container_instance_management_client.py | 66 + .../container_instance_management_client.py | 233 --- .../mgmt/containerinstance/models/__init__.py | 259 +-- ...ainer_instance_management_client_enums.py} | 12 + .../mgmt/containerinstance/models/_models.py | 1602 +++++++++++++++++ .../containerinstance/models/_models_py3.py | 1602 +++++++++++++++++ .../containerinstance/models/_paged_models.py | 79 + .../models/azure_file_volume.py | 52 - .../models/azure_file_volume_py3.py | 52 - .../containerinstance/models/cached_images.py | 43 - .../models/cached_images_list_result.py | 32 - .../models/cached_images_list_result_py3.py | 32 - .../models/cached_images_py3.py | 43 - .../containerinstance/models/capabilities.py | 61 - .../models/capabilities_capabilities.py | 45 - .../models/capabilities_capabilities_py3.py | 45 - .../models/capabilities_list_result.py | 32 - .../models/capabilities_list_result_py3.py | 32 - .../models/capabilities_py3.py | 61 - .../containerinstance/models/container.py | 85 - .../models/container_exec.py | 28 - .../models/container_exec_py3.py | 28 - .../models/container_exec_request.py | 33 - .../models/container_exec_request_py3.py | 33 - .../container_exec_request_terminal_size.py | 32 - ...ontainer_exec_request_terminal_size_py3.py | 32 - .../models/container_exec_response.py | 32 - .../models/container_exec_response_py3.py | 32 - .../models/container_group.py | 121 -- .../models/container_group_diagnostics.py | 28 - .../models/container_group_diagnostics_py3.py | 28 - .../models/container_group_identity.py | 59 - .../models/container_group_identity_py3.py | 59 - ...identity_user_assigned_identities_value.py | 40 - ...tity_user_assigned_identities_value_py3.py | 40 - .../models/container_group_network_profile.py | 34 - .../container_group_network_profile_py3.py | 34 - .../models/container_group_paged.py | 27 - ...ontainer_group_properties_instance_view.py | 40 - ...iner_group_properties_instance_view_py3.py | 40 - .../models/container_group_py3.py | 121 -- .../models/container_http_get.py | 42 - .../models/container_http_get_py3.py | 42 - .../models/container_port.py | 40 - .../models/container_port_py3.py | 40 - .../models/container_probe.py | 52 - .../models/container_probe_py3.py | 52 - .../container_properties_instance_view.py | 53 - .../container_properties_instance_view_py3.py | 53 - .../containerinstance/models/container_py3.py | 85 - .../models/container_state.py | 48 - .../models/container_state_py3.py | 48 - .../models/dns_configuration.py | 43 - .../models/dns_configuration_py3.py | 43 - .../models/environment_variable.py | 42 - .../models/environment_variable_py3.py | 42 - .../mgmt/containerinstance/models/event.py | 48 - .../containerinstance/models/event_py3.py | 48 - .../models/git_repo_volume.py | 46 - .../models/git_repo_volume_py3.py | 46 - .../containerinstance/models/gpu_resource.py | 40 - .../models/gpu_resource_py3.py | 40 - .../models/image_registry_credential.py | 44 - .../models/image_registry_credential_py3.py | 44 - .../containerinstance/models/ip_address.py | 57 - .../models/ip_address_py3.py | 57 - .../containerinstance/models/log_analytics.py | 49 - .../models/log_analytics_py3.py | 49 - .../mgmt/containerinstance/models/logs.py | 28 - .../mgmt/containerinstance/models/logs_py3.py | 28 - .../containerinstance/models/operation.py | 49 - .../models/operation_display.py | 40 - .../models/operation_display_py3.py | 40 - .../models/operation_list_result.py | 33 - .../models/operation_list_result_py3.py | 33 - .../containerinstance/models/operation_py3.py | 49 - .../mgmt/containerinstance/models/port.py | 40 - .../mgmt/containerinstance/models/port_py3.py | 40 - .../mgmt/containerinstance/models/resource.py | 53 - .../models/resource_limits.py | 36 - .../models/resource_limits_py3.py | 36 - .../containerinstance/models/resource_py3.py | 53 - .../models/resource_requests.py | 44 - .../models/resource_requests_py3.py | 44 - .../models/resource_requirements.py | 39 - .../models/resource_requirements_py3.py | 39 - .../mgmt/containerinstance/models/usage.py | 50 - .../models/usage_list_result.py | 35 - .../models/usage_list_result_py3.py | 35 - .../containerinstance/models/usage_name.py | 40 - .../models/usage_name_py3.py | 40 - .../containerinstance/models/usage_py3.py | 50 - .../mgmt/containerinstance/models/volume.py | 50 - .../containerinstance/models/volume_mount.py | 45 - .../models/volume_mount_py3.py | 45 - .../containerinstance/models/volume_py3.py | 50 - .../containerinstance/operations/__init__.py | 14 +- ...ons.py => _container_groups_operations.py} | 114 +- ...perations.py => _containers_operations.py} | 12 +- .../operations/_location_operations.py | 252 +++ .../operations/_operations.py | 102 ++ .../container_group_usage_operations.py | 97 - .../operations/operations.py | 90 - .../service_association_link_operations.py | 97 - .../azure-mgmt-containerinstance/setup.py | 6 +- 108 files changed, 4005 insertions(+), 4712 deletions(-) create mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py create mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py rename sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/{container_instance_management_client_enums.py => _container_instance_management_client_enums.py} (90%) create mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py create mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py create mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_paged_models.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_paged.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount_py3.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_py3.py rename sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/{container_groups_operations.py => _container_groups_operations.py} (92%) rename sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/{container_operations.py => _containers_operations.py} (96%) create mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py create mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py delete mode 100644 sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/service_association_link_operations.py diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/README.md b/sdk/containerinstance/azure-mgmt-containerinstance/README.md index 2a31c3badd6a..01479c1cee28 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/README.md +++ b/sdk/containerinstance/azure-mgmt-containerinstance/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Container Instance Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. - -## Usage - -For code examples, see [Container -Instance](https://docs.microsoft.com/python/api/overview/azure/containerinstance) +For code examples, see [Container Instance](https://docs.microsoft.com/python/api/overview/azure/containerinstance) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-containerinstance%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-containerinstance%2FREADME.png) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/__init__.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/__init__.py index f5fc098aced5..0bdbd6ce3c51 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/__init__.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_instance_management_client import ContainerInstanceManagementClient -from .version import VERSION +from ._configuration import ContainerInstanceManagementClientConfiguration +from ._container_instance_management_client import ContainerInstanceManagementClient +__all__ = ['ContainerInstanceManagementClient', 'ContainerInstanceManagementClientConfiguration'] -__all__ = ['ContainerInstanceManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py new file mode 100644 index 000000000000..f9912ce08665 --- /dev/null +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ContainerInstanceManagementClientConfiguration(AzureConfiguration): + """Configuration for ContainerInstanceManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ContainerInstanceManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-containerinstance/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py new file mode 100644 index 000000000000..e00088ac987f --- /dev/null +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ContainerInstanceManagementClientConfiguration +from .operations import ContainerGroupsOperations +from .operations import Operations +from .operations import LocationOperations +from .operations import ContainersOperations +from . import models + + +class ContainerInstanceManagementClient(SDKClient): + """ContainerInstanceManagementClient + + :ivar config: Configuration for client. + :vartype config: ContainerInstanceManagementClientConfiguration + + :ivar container_groups: ContainerGroups operations + :vartype container_groups: azure.mgmt.containerinstance.operations.ContainerGroupsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerinstance.operations.Operations + :ivar location: Location operations + :vartype location: azure.mgmt.containerinstance.operations.LocationOperations + :ivar containers: Containers operations + :vartype containers: azure.mgmt.containerinstance.operations.ContainersOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ContainerInstanceManagementClientConfiguration(credentials, subscription_id, base_url) + super(ContainerInstanceManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-12-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.container_groups = ContainerGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.location = LocationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.containers = ContainersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py deleted file mode 100644 index 3de375593227..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py +++ /dev/null @@ -1,233 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -import uuid -from .operations.container_groups_operations import ContainerGroupsOperations -from .operations.operations import Operations -from .operations.container_group_usage_operations import ContainerGroupUsageOperations -from .operations.container_operations import ContainerOperations -from .operations.service_association_link_operations import ServiceAssociationLinkOperations -from . import models - - -class ContainerInstanceManagementClientConfiguration(AzureConfiguration): - """Configuration for ContainerInstanceManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerInstanceManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerinstance/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerInstanceManagementClient(SDKClient): - """ContainerInstanceManagementClient - - :ivar config: Configuration for client. - :vartype config: ContainerInstanceManagementClientConfiguration - - :ivar container_groups: ContainerGroups operations - :vartype container_groups: azure.mgmt.containerinstance.operations.ContainerGroupsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerinstance.operations.Operations - :ivar container_group_usage: ContainerGroupUsage operations - :vartype container_group_usage: azure.mgmt.containerinstance.operations.ContainerGroupUsageOperations - :ivar container: Container operations - :vartype container: azure.mgmt.containerinstance.operations.ContainerOperations - :ivar service_association_link: ServiceAssociationLink operations - :vartype service_association_link: azure.mgmt.containerinstance.operations.ServiceAssociationLinkOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerInstanceManagementClientConfiguration(credentials, subscription_id, base_url) - super(ContainerInstanceManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-10-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.container_groups = ContainerGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.container_group_usage = ContainerGroupUsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.container = ContainerOperations( - self._client, self.config, self._serialize, self._deserialize) - self.service_association_link = ServiceAssociationLinkOperations( - self._client, self.config, self._serialize, self._deserialize) - - def list_cached_images( - self, location, custom_headers=None, raw=False, **operation_config): - """Get the list of cached images. - - Get the list of cached images on specific OS type for a subscription in - a region. - - :param location: The identifier for the physical azure location. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CachedImagesListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerinstance.models.CachedImagesListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cached_images.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CachedImagesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cached_images.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages'} - - def list_capabilities( - self, location, custom_headers=None, raw=False, **operation_config): - """Get the list of capabilities of the location. - - Get the list of CPU/memory/GPU capabilities of a region. - - :param location: The identifier for the physical azure location. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CapabilitiesListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerinstance.models.CapabilitiesListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_capabilities.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CapabilitiesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities'} diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py index 943b8e9964c9..fb106fa7b356 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py @@ -10,161 +10,170 @@ # -------------------------------------------------------------------------- try: - from .container_port_py3 import ContainerPort - from .environment_variable_py3 import EnvironmentVariable - from .container_state_py3 import ContainerState - from .event_py3 import Event - from .container_properties_instance_view_py3 import ContainerPropertiesInstanceView - from .gpu_resource_py3 import GpuResource - from .resource_requests_py3 import ResourceRequests - from .resource_limits_py3 import ResourceLimits - from .resource_requirements_py3 import ResourceRequirements - from .volume_mount_py3 import VolumeMount - from .container_exec_py3 import ContainerExec - from .container_http_get_py3 import ContainerHttpGet - from .container_probe_py3 import ContainerProbe - from .container_py3 import Container - from .azure_file_volume_py3 import AzureFileVolume - from .git_repo_volume_py3 import GitRepoVolume - from .volume_py3 import Volume - from .container_group_identity_user_assigned_identities_value_py3 import ContainerGroupIdentityUserAssignedIdentitiesValue - from .container_group_identity_py3 import ContainerGroupIdentity - from .image_registry_credential_py3 import ImageRegistryCredential - from .port_py3 import Port - from .ip_address_py3 import IpAddress - from .container_group_properties_instance_view_py3 import ContainerGroupPropertiesInstanceView - from .log_analytics_py3 import LogAnalytics - from .container_group_diagnostics_py3 import ContainerGroupDiagnostics - from .container_group_network_profile_py3 import ContainerGroupNetworkProfile - from .dns_configuration_py3 import DnsConfiguration - from .container_group_py3 import ContainerGroup - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_result_py3 import OperationListResult - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .usage_list_result_py3 import UsageListResult - from .logs_py3 import Logs - from .container_exec_request_terminal_size_py3 import ContainerExecRequestTerminalSize - from .container_exec_request_py3 import ContainerExecRequest - from .container_exec_response_py3 import ContainerExecResponse - from .resource_py3 import Resource - from .cached_images_py3 import CachedImages - from .cached_images_list_result_py3 import CachedImagesListResult - from .capabilities_capabilities_py3 import CapabilitiesCapabilities - from .capabilities_py3 import Capabilities - from .capabilities_list_result_py3 import CapabilitiesListResult + from ._models_py3 import AzureFileVolume + from ._models_py3 import CachedImages + from ._models_py3 import Capabilities + from ._models_py3 import CapabilitiesCapabilities + from ._models_py3 import Container + from ._models_py3 import ContainerExec + from ._models_py3 import ContainerExecRequest + from ._models_py3 import ContainerExecRequestTerminalSize + from ._models_py3 import ContainerExecResponse + from ._models_py3 import ContainerGroup + from ._models_py3 import ContainerGroupDiagnostics + from ._models_py3 import ContainerGroupIdentity + from ._models_py3 import ContainerGroupIdentityUserAssignedIdentitiesValue + from ._models_py3 import ContainerGroupNetworkProfile + from ._models_py3 import ContainerGroupPropertiesInstanceView + from ._models_py3 import ContainerHttpGet + from ._models_py3 import ContainerPort + from ._models_py3 import ContainerProbe + from ._models_py3 import ContainerPropertiesInstanceView + from ._models_py3 import ContainerState + from ._models_py3 import DnsConfiguration + from ._models_py3 import EncryptionProperties + from ._models_py3 import EnvironmentVariable + from ._models_py3 import Event + from ._models_py3 import GitRepoVolume + from ._models_py3 import GpuResource + from ._models_py3 import ImageRegistryCredential + from ._models_py3 import InitContainerDefinition + from ._models_py3 import InitContainerPropertiesDefinitionInstanceView + from ._models_py3 import IpAddress + from ._models_py3 import LogAnalytics + from ._models_py3 import Logs + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import Port + from ._models_py3 import Resource + from ._models_py3 import ResourceLimits + from ._models_py3 import ResourceRequests + from ._models_py3 import ResourceRequirements + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import Volume + from ._models_py3 import VolumeMount except (SyntaxError, ImportError): - from .container_port import ContainerPort - from .environment_variable import EnvironmentVariable - from .container_state import ContainerState - from .event import Event - from .container_properties_instance_view import ContainerPropertiesInstanceView - from .gpu_resource import GpuResource - from .resource_requests import ResourceRequests - from .resource_limits import ResourceLimits - from .resource_requirements import ResourceRequirements - from .volume_mount import VolumeMount - from .container_exec import ContainerExec - from .container_http_get import ContainerHttpGet - from .container_probe import ContainerProbe - from .container import Container - from .azure_file_volume import AzureFileVolume - from .git_repo_volume import GitRepoVolume - from .volume import Volume - from .container_group_identity_user_assigned_identities_value import ContainerGroupIdentityUserAssignedIdentitiesValue - from .container_group_identity import ContainerGroupIdentity - from .image_registry_credential import ImageRegistryCredential - from .port import Port - from .ip_address import IpAddress - from .container_group_properties_instance_view import ContainerGroupPropertiesInstanceView - from .log_analytics import LogAnalytics - from .container_group_diagnostics import ContainerGroupDiagnostics - from .container_group_network_profile import ContainerGroupNetworkProfile - from .dns_configuration import DnsConfiguration - from .container_group import ContainerGroup - from .operation_display import OperationDisplay - from .operation import Operation - from .operation_list_result import OperationListResult - from .usage_name import UsageName - from .usage import Usage - from .usage_list_result import UsageListResult - from .logs import Logs - from .container_exec_request_terminal_size import ContainerExecRequestTerminalSize - from .container_exec_request import ContainerExecRequest - from .container_exec_response import ContainerExecResponse - from .resource import Resource - from .cached_images import CachedImages - from .cached_images_list_result import CachedImagesListResult - from .capabilities_capabilities import CapabilitiesCapabilities - from .capabilities import Capabilities - from .capabilities_list_result import CapabilitiesListResult -from .container_group_paged import ContainerGroupPaged -from .container_instance_management_client_enums import ( + from ._models import AzureFileVolume + from ._models import CachedImages + from ._models import Capabilities + from ._models import CapabilitiesCapabilities + from ._models import Container + from ._models import ContainerExec + from ._models import ContainerExecRequest + from ._models import ContainerExecRequestTerminalSize + from ._models import ContainerExecResponse + from ._models import ContainerGroup + from ._models import ContainerGroupDiagnostics + from ._models import ContainerGroupIdentity + from ._models import ContainerGroupIdentityUserAssignedIdentitiesValue + from ._models import ContainerGroupNetworkProfile + from ._models import ContainerGroupPropertiesInstanceView + from ._models import ContainerHttpGet + from ._models import ContainerPort + from ._models import ContainerProbe + from ._models import ContainerPropertiesInstanceView + from ._models import ContainerState + from ._models import DnsConfiguration + from ._models import EncryptionProperties + from ._models import EnvironmentVariable + from ._models import Event + from ._models import GitRepoVolume + from ._models import GpuResource + from ._models import ImageRegistryCredential + from ._models import InitContainerDefinition + from ._models import InitContainerPropertiesDefinitionInstanceView + from ._models import IpAddress + from ._models import LogAnalytics + from ._models import Logs + from ._models import Operation + from ._models import OperationDisplay + from ._models import Port + from ._models import Resource + from ._models import ResourceLimits + from ._models import ResourceRequests + from ._models import ResourceRequirements + from ._models import Usage + from ._models import UsageName + from ._models import Volume + from ._models import VolumeMount +from ._paged_models import CachedImagesPaged +from ._paged_models import CapabilitiesPaged +from ._paged_models import ContainerGroupPaged +from ._paged_models import OperationPaged +from ._paged_models import UsagePaged +from ._container_instance_management_client_enums import ( ContainerNetworkProtocol, GpuSku, + Scheme, ResourceIdentityType, ContainerGroupRestartPolicy, ContainerGroupNetworkProtocol, ContainerGroupIpAddressType, OperatingSystemTypes, LogAnalyticsLogType, + ContainerGroupSku, ContainerInstanceOperationsOrigin, ) __all__ = [ - 'ContainerPort', - 'EnvironmentVariable', - 'ContainerState', - 'Event', - 'ContainerPropertiesInstanceView', - 'GpuResource', - 'ResourceRequests', - 'ResourceLimits', - 'ResourceRequirements', - 'VolumeMount', + 'AzureFileVolume', + 'CachedImages', + 'Capabilities', + 'CapabilitiesCapabilities', + 'Container', 'ContainerExec', + 'ContainerExecRequest', + 'ContainerExecRequestTerminalSize', + 'ContainerExecResponse', + 'ContainerGroup', + 'ContainerGroupDiagnostics', + 'ContainerGroupIdentity', + 'ContainerGroupIdentityUserAssignedIdentitiesValue', + 'ContainerGroupNetworkProfile', + 'ContainerGroupPropertiesInstanceView', 'ContainerHttpGet', + 'ContainerPort', 'ContainerProbe', - 'Container', - 'AzureFileVolume', + 'ContainerPropertiesInstanceView', + 'ContainerState', + 'DnsConfiguration', + 'EncryptionProperties', + 'EnvironmentVariable', + 'Event', 'GitRepoVolume', - 'Volume', - 'ContainerGroupIdentityUserAssignedIdentitiesValue', - 'ContainerGroupIdentity', + 'GpuResource', 'ImageRegistryCredential', - 'Port', + 'InitContainerDefinition', + 'InitContainerPropertiesDefinitionInstanceView', 'IpAddress', - 'ContainerGroupPropertiesInstanceView', 'LogAnalytics', - 'ContainerGroupDiagnostics', - 'ContainerGroupNetworkProfile', - 'DnsConfiguration', - 'ContainerGroup', - 'OperationDisplay', - 'Operation', - 'OperationListResult', - 'UsageName', - 'Usage', - 'UsageListResult', 'Logs', - 'ContainerExecRequestTerminalSize', - 'ContainerExecRequest', - 'ContainerExecResponse', + 'Operation', + 'OperationDisplay', + 'Port', 'Resource', - 'CachedImages', - 'CachedImagesListResult', - 'CapabilitiesCapabilities', - 'Capabilities', - 'CapabilitiesListResult', + 'ResourceLimits', + 'ResourceRequests', + 'ResourceRequirements', + 'Usage', + 'UsageName', + 'Volume', + 'VolumeMount', 'ContainerGroupPaged', + 'OperationPaged', + 'UsagePaged', + 'CachedImagesPaged', + 'CapabilitiesPaged', 'ContainerNetworkProtocol', 'GpuSku', + 'Scheme', 'ResourceIdentityType', 'ContainerGroupRestartPolicy', 'ContainerGroupNetworkProtocol', 'ContainerGroupIpAddressType', 'OperatingSystemTypes', 'LogAnalyticsLogType', + 'ContainerGroupSku', 'ContainerInstanceOperationsOrigin', ] diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_container_instance_management_client_enums.py similarity index 90% rename from sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py rename to sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_container_instance_management_client_enums.py index b7556beaa4f9..25e77dc4fc7a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_container_instance_management_client_enums.py @@ -25,6 +25,12 @@ class GpuSku(str, Enum): v100 = "V100" +class Scheme(str, Enum): + + http = "http" + https = "https" + + class ResourceIdentityType(str, Enum): system_assigned = "SystemAssigned" @@ -64,6 +70,12 @@ class LogAnalyticsLogType(str, Enum): container_instance_logs = "ContainerInstanceLogs" +class ContainerGroupSku(str, Enum): + + standard = "Standard" + dedicated = "Dedicated" + + class ContainerInstanceOperationsOrigin(str, Enum): user = "User" diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py new file mode 100644 index 000000000000..f360b19f0056 --- /dev/null +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py @@ -0,0 +1,1602 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AzureFileVolume(Model): + """The properties of the Azure File volume. Azure File shares are mounted as + volumes. + + All required parameters must be populated in order to send to Azure. + + :param share_name: Required. The name of the Azure File share to be + mounted as a volume. + :type share_name: str + :param read_only: The flag indicating whether the Azure File shared + mounted as a volume is read-only. + :type read_only: bool + :param storage_account_name: Required. The name of the storage account + that contains the Azure File share. + :type storage_account_name: str + :param storage_account_key: The storage account access key used to access + the Azure File share. + :type storage_account_key: str + """ + + _validation = { + 'share_name': {'required': True}, + 'storage_account_name': {'required': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_key': {'key': 'storageAccountKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileVolume, self).__init__(**kwargs) + self.share_name = kwargs.get('share_name', None) + self.read_only = kwargs.get('read_only', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.storage_account_key = kwargs.get('storage_account_key', None) + + +class CachedImages(Model): + """The cached image and OS type. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The OS type of the cached image. + :type os_type: str + :param image: Required. The cached image name. + :type image: str + """ + + _validation = { + 'os_type': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CachedImages, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + + +class Capabilities(Model): + """The regional capabilities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type that this capability describes. + :vartype resource_type: str + :ivar os_type: The OS type that this capability describes. + :vartype os_type: str + :ivar location: The resource location. + :vartype location: str + :ivar ip_address_type: The ip address type that this capability describes. + :vartype ip_address_type: str + :ivar gpu: The GPU sku that this capability describes. + :vartype gpu: str + :ivar capabilities: The supported capabilities. + :vartype capabilities: + ~azure.mgmt.containerinstance.models.CapabilitiesCapabilities + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'os_type': {'readonly': True}, + 'location': {'readonly': True}, + 'ip_address_type': {'readonly': True}, + 'gpu': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'ip_address_type': {'key': 'ipAddressType', 'type': 'str'}, + 'gpu': {'key': 'gpu', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': 'CapabilitiesCapabilities'}, + } + + def __init__(self, **kwargs): + super(Capabilities, self).__init__(**kwargs) + self.resource_type = None + self.os_type = None + self.location = None + self.ip_address_type = None + self.gpu = None + self.capabilities = None + + +class CapabilitiesCapabilities(Model): + """The supported capabilities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar max_memory_in_gb: The maximum allowed memory request in GB. + :vartype max_memory_in_gb: float + :ivar max_cpu: The maximum allowed CPU request in cores. + :vartype max_cpu: float + :ivar max_gpu_count: The maximum allowed GPU count. + :vartype max_gpu_count: float + """ + + _validation = { + 'max_memory_in_gb': {'readonly': True}, + 'max_cpu': {'readonly': True}, + 'max_gpu_count': {'readonly': True}, + } + + _attribute_map = { + 'max_memory_in_gb': {'key': 'maxMemoryInGB', 'type': 'float'}, + 'max_cpu': {'key': 'maxCpu', 'type': 'float'}, + 'max_gpu_count': {'key': 'maxGpuCount', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(CapabilitiesCapabilities, self).__init__(**kwargs) + self.max_memory_in_gb = None + self.max_cpu = None + self.max_gpu_count = None + + +class CloudError(Model): + """An error response from the Container Instance service. + + :param error: + :type error: ~azure.mgmt.containerinstance.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the Container Instance service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerinstance.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Container(Model): + """A container instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The user-provided name of the container instance. + :type name: str + :param image: Required. The name of the image used to create the container + instance. + :type image: str + :param command: The commands to execute within the container instance in + exec form. + :type command: list[str] + :param ports: The exposed ports on the container instance. + :type ports: list[~azure.mgmt.containerinstance.models.ContainerPort] + :param environment_variables: The environment variables to set in the + container instance. + :type environment_variables: + list[~azure.mgmt.containerinstance.models.EnvironmentVariable] + :ivar instance_view: The instance view of the container instance. Only + valid in response. + :vartype instance_view: + ~azure.mgmt.containerinstance.models.ContainerPropertiesInstanceView + :param resources: Required. The resource requirements of the container + instance. + :type resources: ~azure.mgmt.containerinstance.models.ResourceRequirements + :param volume_mounts: The volume mounts available to the container + instance. + :type volume_mounts: + list[~azure.mgmt.containerinstance.models.VolumeMount] + :param liveness_probe: The liveness probe. + :type liveness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe + :param readiness_probe: The readiness probe. + :type readiness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'instance_view': {'readonly': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'properties.image', 'type': 'str'}, + 'command': {'key': 'properties.command', 'type': '[str]'}, + 'ports': {'key': 'properties.ports', 'type': '[ContainerPort]'}, + 'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerPropertiesInstanceView'}, + 'resources': {'key': 'properties.resources', 'type': 'ResourceRequirements'}, + 'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'}, + 'liveness_probe': {'key': 'properties.livenessProbe', 'type': 'ContainerProbe'}, + 'readiness_probe': {'key': 'properties.readinessProbe', 'type': 'ContainerProbe'}, + } + + def __init__(self, **kwargs): + super(Container, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.image = kwargs.get('image', None) + self.command = kwargs.get('command', None) + self.ports = kwargs.get('ports', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.instance_view = None + self.resources = kwargs.get('resources', None) + self.volume_mounts = kwargs.get('volume_mounts', None) + self.liveness_probe = kwargs.get('liveness_probe', None) + self.readiness_probe = kwargs.get('readiness_probe', None) + + +class ContainerExec(Model): + """The container execution command, for liveness or readiness probe. + + :param command: The commands to execute within the container. + :type command: list[str] + """ + + _attribute_map = { + 'command': {'key': 'command', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ContainerExec, self).__init__(**kwargs) + self.command = kwargs.get('command', None) + + +class ContainerExecRequest(Model): + """The container exec request. + + :param command: The command to be executed. + :type command: str + :param terminal_size: The size of the terminal. + :type terminal_size: + ~azure.mgmt.containerinstance.models.ContainerExecRequestTerminalSize + """ + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + 'terminal_size': {'key': 'terminalSize', 'type': 'ContainerExecRequestTerminalSize'}, + } + + def __init__(self, **kwargs): + super(ContainerExecRequest, self).__init__(**kwargs) + self.command = kwargs.get('command', None) + self.terminal_size = kwargs.get('terminal_size', None) + + +class ContainerExecRequestTerminalSize(Model): + """The size of the terminal. + + :param rows: The row size of the terminal + :type rows: int + :param cols: The column size of the terminal + :type cols: int + """ + + _attribute_map = { + 'rows': {'key': 'rows', 'type': 'int'}, + 'cols': {'key': 'cols', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ContainerExecRequestTerminalSize, self).__init__(**kwargs) + self.rows = kwargs.get('rows', None) + self.cols = kwargs.get('cols', None) + + +class ContainerExecResponse(Model): + """The information for the container exec command. + + :param web_socket_uri: The uri for the exec websocket. + :type web_socket_uri: str + :param password: The password to start the exec command. + :type password: str + """ + + _attribute_map = { + 'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerExecResponse, self).__init__(**kwargs) + self.web_socket_uri = kwargs.get('web_socket_uri', None) + self.password = kwargs.get('password', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ContainerGroup(Resource): + """A container group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param identity: The identity of the container group, if configured. + :type identity: + ~azure.mgmt.containerinstance.models.ContainerGroupIdentity + :ivar provisioning_state: The provisioning state of the container group. + This only appears in the response. + :vartype provisioning_state: str + :param containers: Required. The containers within the container group. + :type containers: list[~azure.mgmt.containerinstance.models.Container] + :param image_registry_credentials: The image registry credentials by which + the container group is created from. + :type image_registry_credentials: + list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] + :param restart_policy: Restart policy for all containers within the + container group. + - `Always` Always restart + - `OnFailure` Restart on failure + - `Never` Never restart + . Possible values include: 'Always', 'OnFailure', 'Never' + :type restart_policy: str or + ~azure.mgmt.containerinstance.models.ContainerGroupRestartPolicy + :param ip_address: The IP address type of the container group. + :type ip_address: ~azure.mgmt.containerinstance.models.IpAddress + :param os_type: Required. The operating system type required by the + containers in the container group. Possible values include: 'Windows', + 'Linux' + :type os_type: str or + ~azure.mgmt.containerinstance.models.OperatingSystemTypes + :param volumes: The list of volumes that can be mounted by containers in + this container group. + :type volumes: list[~azure.mgmt.containerinstance.models.Volume] + :ivar instance_view: The instance view of the container group. Only valid + in response. + :vartype instance_view: + ~azure.mgmt.containerinstance.models.ContainerGroupPropertiesInstanceView + :param diagnostics: The diagnostic information for a container group. + :type diagnostics: + ~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics + :param network_profile: The network profile information for a container + group. + :type network_profile: + ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile + :param dns_config: The DNS config information for a container group. + :type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration + :param sku: The SKU for a container group. Possible values include: + 'Standard', 'Dedicated' + :type sku: str or ~azure.mgmt.containerinstance.models.ContainerGroupSku + :param encryption_properties: The encryption properties for a container + group. + :type encryption_properties: + ~azure.mgmt.containerinstance.models.EncryptionProperties + :param init_containers: The init containers for a container group. + :type init_containers: + list[~azure.mgmt.containerinstance.models.InitContainerDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'containers': {'required': True}, + 'os_type': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ContainerGroupIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'containers': {'key': 'properties.containers', 'type': '[Container]'}, + 'image_registry_credentials': {'key': 'properties.imageRegistryCredentials', 'type': '[ImageRegistryCredential]'}, + 'restart_policy': {'key': 'properties.restartPolicy', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'IpAddress'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'volumes': {'key': 'properties.volumes', 'type': '[Volume]'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, + 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'encryption_properties': {'key': 'properties.encryptionProperties', 'type': 'EncryptionProperties'}, + 'init_containers': {'key': 'properties.initContainers', 'type': '[InitContainerDefinition]'}, + } + + def __init__(self, **kwargs): + super(ContainerGroup, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.containers = kwargs.get('containers', None) + self.image_registry_credentials = kwargs.get('image_registry_credentials', None) + self.restart_policy = kwargs.get('restart_policy', None) + self.ip_address = kwargs.get('ip_address', None) + self.os_type = kwargs.get('os_type', None) + self.volumes = kwargs.get('volumes', None) + self.instance_view = None + self.diagnostics = kwargs.get('diagnostics', None) + self.network_profile = kwargs.get('network_profile', None) + self.dns_config = kwargs.get('dns_config', None) + self.sku = kwargs.get('sku', None) + self.encryption_properties = kwargs.get('encryption_properties', None) + self.init_containers = kwargs.get('init_containers', None) + + +class ContainerGroupDiagnostics(Model): + """Container group diagnostic information. + + :param log_analytics: Container group log analytics information. + :type log_analytics: ~azure.mgmt.containerinstance.models.LogAnalytics + """ + + _attribute_map = { + 'log_analytics': {'key': 'logAnalytics', 'type': 'LogAnalytics'}, + } + + def __init__(self, **kwargs): + super(ContainerGroupDiagnostics, self).__init__(**kwargs) + self.log_analytics = kwargs.get('log_analytics', None) + + +class ContainerGroupIdentity(Model): + """Identity for the container group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of the container group identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the container group. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the container group. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the container group. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.containerinstance.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the container group. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerinstance.models.ContainerGroupIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ContainerGroupIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(ContainerGroupIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ContainerGroupIdentityUserAssignedIdentitiesValue(Model): + """ContainerGroupIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerGroupIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ContainerGroupNetworkProfile(Model): + """Container group network profile information. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The identifier for a network profile. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerGroupNetworkProfile, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ContainerGroupPropertiesInstanceView(Model): + """The instance view of the container group. Only valid in response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar events: The events of this container group. + :vartype events: list[~azure.mgmt.containerinstance.models.Event] + :ivar state: The state of the container group. Only valid in response. + :vartype state: str + """ + + _validation = { + 'events': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'events': {'key': 'events', 'type': '[Event]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerGroupPropertiesInstanceView, self).__init__(**kwargs) + self.events = None + self.state = None + + +class ContainerHttpGet(Model): + """The container Http Get settings, for liveness or readiness probe. + + All required parameters must be populated in order to send to Azure. + + :param path: The path to probe. + :type path: str + :param port: Required. The port number to probe. + :type port: int + :param scheme: The scheme. Possible values include: 'http', 'https' + :type scheme: str or ~azure.mgmt.containerinstance.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerHttpGet, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.port = kwargs.get('port', None) + self.scheme = kwargs.get('scheme', None) + + +class ContainerPort(Model): + """The port exposed on the container instance. + + All required parameters must be populated in order to send to Azure. + + :param protocol: The protocol associated with the port. Possible values + include: 'TCP', 'UDP' + :type protocol: str or + ~azure.mgmt.containerinstance.models.ContainerNetworkProtocol + :param port: Required. The port number exposed within the container group. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ContainerPort, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.port = kwargs.get('port', None) + + +class ContainerProbe(Model): + """The container probe, for liveness or readiness. + + :param exec_property: The execution command to probe + :type exec_property: ~azure.mgmt.containerinstance.models.ContainerExec + :param http_get: The Http Get settings to probe + :type http_get: ~azure.mgmt.containerinstance.models.ContainerHttpGet + :param initial_delay_seconds: The initial delay seconds. + :type initial_delay_seconds: int + :param period_seconds: The period seconds. + :type period_seconds: int + :param failure_threshold: The failure threshold. + :type failure_threshold: int + :param success_threshold: The success threshold. + :type success_threshold: int + :param timeout_seconds: The timeout seconds. + :type timeout_seconds: int + """ + + _attribute_map = { + 'exec_property': {'key': 'exec', 'type': 'ContainerExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ContainerHttpGet'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ContainerProbe, self).__init__(**kwargs) + self.exec_property = kwargs.get('exec_property', None) + self.http_get = kwargs.get('http_get', None) + self.initial_delay_seconds = kwargs.get('initial_delay_seconds', None) + self.period_seconds = kwargs.get('period_seconds', None) + self.failure_threshold = kwargs.get('failure_threshold', None) + self.success_threshold = kwargs.get('success_threshold', None) + self.timeout_seconds = kwargs.get('timeout_seconds', None) + + +class ContainerPropertiesInstanceView(Model): + """The instance view of the container instance. Only valid in response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar restart_count: The number of times that the container instance has + been restarted. + :vartype restart_count: int + :ivar current_state: Current container instance state. + :vartype current_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar previous_state: Previous container instance state. + :vartype previous_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar events: The events of the container instance. + :vartype events: list[~azure.mgmt.containerinstance.models.Event] + """ + + _validation = { + 'restart_count': {'readonly': True}, + 'current_state': {'readonly': True}, + 'previous_state': {'readonly': True}, + 'events': {'readonly': True}, + } + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[Event]'}, + } + + def __init__(self, **kwargs): + super(ContainerPropertiesInstanceView, self).__init__(**kwargs) + self.restart_count = None + self.current_state = None + self.previous_state = None + self.events = None + + +class ContainerState(Model): + """The container instance state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar state: The state of the container instance. + :vartype state: str + :ivar start_time: The date-time when the container instance state started. + :vartype start_time: datetime + :ivar exit_code: The container instance exit codes correspond to those + from the `docker run` command. + :vartype exit_code: int + :ivar finish_time: The date-time when the container instance state + finished. + :vartype finish_time: datetime + :ivar detail_status: The human-readable status of the container instance + state. + :vartype detail_status: str + """ + + _validation = { + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'exit_code': {'readonly': True}, + 'finish_time': {'readonly': True}, + 'detail_status': {'readonly': True}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'int'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerState, self).__init__(**kwargs) + self.state = None + self.start_time = None + self.exit_code = None + self.finish_time = None + self.detail_status = None + + +class DnsConfiguration(Model): + """DNS configuration for the container group. + + All required parameters must be populated in order to send to Azure. + + :param name_servers: Required. The DNS servers for the container group. + :type name_servers: list[str] + :param search_domains: The DNS search domains for hostname lookup in the + container group. + :type search_domains: str + :param options: The DNS options for the container group. + :type options: str + """ + + _validation = { + 'name_servers': {'required': True}, + } + + _attribute_map = { + 'name_servers': {'key': 'nameServers', 'type': '[str]'}, + 'search_domains': {'key': 'searchDomains', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DnsConfiguration, self).__init__(**kwargs) + self.name_servers = kwargs.get('name_servers', None) + self.search_domains = kwargs.get('search_domains', None) + self.options = kwargs.get('options', None) + + +class EncryptionProperties(Model): + """The container group encryption properties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. The keyvault base url. + :type vault_base_url: str + :param key_name: Required. The encryption key name. + :type key_name: str + :param key_version: Required. The encryption key version. + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProperties, self).__init__(**kwargs) + self.vault_base_url = kwargs.get('vault_base_url', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + + +class EnvironmentVariable(Model): + """The environment variable to set within the container instance. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. + :type name: str + :param value: The value of the environment variable. + :type value: str + :param secure_value: The value of the secure environment variable. + :type secure_value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'secure_value': {'key': 'secureValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentVariable, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.secure_value = kwargs.get('secure_value', None) + + +class Event(Model): + """A container group or container instance event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The count of the event. + :vartype count: int + :ivar first_timestamp: The date-time of the earliest logged event. + :vartype first_timestamp: datetime + :ivar last_timestamp: The date-time of the latest logged event. + :vartype last_timestamp: datetime + :ivar name: The event name. + :vartype name: str + :ivar message: The event message. + :vartype message: str + :ivar type: The event type. + :vartype type: str + """ + + _validation = { + 'count': {'readonly': True}, + 'first_timestamp': {'readonly': True}, + 'last_timestamp': {'readonly': True}, + 'name': {'readonly': True}, + 'message': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'iso-8601'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.count = None + self.first_timestamp = None + self.last_timestamp = None + self.name = None + self.message = None + self.type = None + + +class GitRepoVolume(Model): + """Represents a volume that is populated with the contents of a git + repository. + + All required parameters must be populated in order to send to Azure. + + :param directory: Target directory name. Must not contain or start with + '..'. If '.' is supplied, the volume directory will be the git + repository. Otherwise, if specified, the volume will contain the git + repository in the subdirectory with the given name. + :type directory: str + :param repository: Required. Repository URL + :type repository: str + :param revision: Commit hash for the specified revision. + :type revision: str + """ + + _validation = { + 'repository': {'required': True}, + } + + _attribute_map = { + 'directory': {'key': 'directory', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GitRepoVolume, self).__init__(**kwargs) + self.directory = kwargs.get('directory', None) + self.repository = kwargs.get('repository', None) + self.revision = kwargs.get('revision', None) + + +class GpuResource(Model): + """The GPU resource. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The count of the GPU resource. + :type count: int + :param sku: Required. The SKU of the GPU resource. Possible values + include: 'K80', 'P100', 'V100' + :type sku: str or ~azure.mgmt.containerinstance.models.GpuSku + """ + + _validation = { + 'count': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GpuResource, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.sku = kwargs.get('sku', None) + + +class ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. The Docker image registry server without a + protocol such as "http" and "https". + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password: The password for the private registry. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class InitContainerDefinition(Model): + """The init container definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name for the init container. + :type name: str + :param image: The image of the init container. + :type image: str + :param command: The command to execute within the init container in exec + form. + :type command: list[str] + :param environment_variables: The environment variables to set in the init + container. + :type environment_variables: + list[~azure.mgmt.containerinstance.models.EnvironmentVariable] + :ivar instance_view: The instance view of the init container. Only valid + in response. + :vartype instance_view: + ~azure.mgmt.containerinstance.models.InitContainerPropertiesDefinitionInstanceView + :param volume_mounts: The volume mounts available to the init container. + :type volume_mounts: + list[~azure.mgmt.containerinstance.models.VolumeMount] + """ + + _validation = { + 'name': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'properties.image', 'type': 'str'}, + 'command': {'key': 'properties.command', 'type': '[str]'}, + 'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'InitContainerPropertiesDefinitionInstanceView'}, + 'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'}, + } + + def __init__(self, **kwargs): + super(InitContainerDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.image = kwargs.get('image', None) + self.command = kwargs.get('command', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.instance_view = None + self.volume_mounts = kwargs.get('volume_mounts', None) + + +class InitContainerPropertiesDefinitionInstanceView(Model): + """The instance view of the init container. Only valid in response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar restart_count: The number of times that the init container has been + restarted. + :vartype restart_count: int + :ivar current_state: The current state of the init container. + :vartype current_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar previous_state: The previous state of the init container. + :vartype previous_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar events: The events of the init container. + :vartype events: list[~azure.mgmt.containerinstance.models.Event] + """ + + _validation = { + 'restart_count': {'readonly': True}, + 'current_state': {'readonly': True}, + 'previous_state': {'readonly': True}, + 'events': {'readonly': True}, + } + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[Event]'}, + } + + def __init__(self, **kwargs): + super(InitContainerPropertiesDefinitionInstanceView, self).__init__(**kwargs) + self.restart_count = None + self.current_state = None + self.previous_state = None + self.events = None + + +class IpAddress(Model): + """IP address for the container group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param ports: Required. The list of ports exposed on the container group. + :type ports: list[~azure.mgmt.containerinstance.models.Port] + :param type: Required. Specifies if the IP is exposed to the public + internet or private VNET. Possible values include: 'Public', 'Private' + :type type: str or + ~azure.mgmt.containerinstance.models.ContainerGroupIpAddressType + :param ip: The IP exposed to the public internet. + :type ip: str + :param dns_name_label: The Dns name label for the IP. + :type dns_name_label: str + :ivar fqdn: The FQDN for the IP. + :vartype fqdn: str + """ + + _validation = { + 'ports': {'required': True}, + 'type': {'required': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'ports': {'key': 'ports', 'type': '[Port]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + 'dns_name_label': {'key': 'dnsNameLabel', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpAddress, self).__init__(**kwargs) + self.ports = kwargs.get('ports', None) + self.type = kwargs.get('type', None) + self.ip = kwargs.get('ip', None) + self.dns_name_label = kwargs.get('dns_name_label', None) + self.fqdn = None + + +class LogAnalytics(Model): + """Container group log analytics information. + + All required parameters must be populated in order to send to Azure. + + :param workspace_id: Required. The workspace id for log analytics + :type workspace_id: str + :param workspace_key: Required. The workspace key for log analytics + :type workspace_key: str + :param log_type: The log type to be used. Possible values include: + 'ContainerInsights', 'ContainerInstanceLogs' + :type log_type: str or + ~azure.mgmt.containerinstance.models.LogAnalyticsLogType + :param metadata: Metadata for log analytics. + :type metadata: dict[str, str] + """ + + _validation = { + 'workspace_id': {'required': True}, + 'workspace_key': {'required': True}, + } + + _attribute_map = { + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'workspace_key': {'key': 'workspaceKey', 'type': 'str'}, + 'log_type': {'key': 'logType', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LogAnalytics, self).__init__(**kwargs) + self.workspace_id = kwargs.get('workspace_id', None) + self.workspace_key = kwargs.get('workspace_key', None) + self.log_type = kwargs.get('log_type', None) + self.metadata = kwargs.get('metadata', None) + + +class Logs(Model): + """The logs. + + :param content: The content of the log. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Logs, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + + +class Operation(Model): + """An operation for Azure Container Instance service. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the operation. + :type name: str + :param display: Required. The display information of the operation. + :type display: ~azure.mgmt.containerinstance.models.OperationDisplay + :param properties: The additional properties. + :type properties: object + :param origin: The intended executor of the operation. Possible values + include: 'User', 'System' + :type origin: str or + ~azure.mgmt.containerinstance.models.ContainerInstanceOperationsOrigin + """ + + _validation = { + 'name': {'required': True}, + 'display': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.properties = kwargs.get('properties', None) + self.origin = kwargs.get('origin', None) + + +class OperationDisplay(Model): + """The display information of the operation. + + :param provider: The name of the provider of the operation. + :type provider: str + :param resource: The name of the resource type of the operation. + :type resource: str + :param operation: The friendly name of the operation. + :type operation: str + :param description: The description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class Port(Model): + """The port exposed on the container group. + + All required parameters must be populated in order to send to Azure. + + :param protocol: The protocol associated with the port. Possible values + include: 'TCP', 'UDP' + :type protocol: str or + ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProtocol + :param port: Required. The port number. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Port, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.port = kwargs.get('port', None) + + +class ResourceLimits(Model): + """The resource limits. + + :param memory_in_gb: The memory limit in GB of this container instance. + :type memory_in_gb: float + :param cpu: The CPU limit of this container instance. + :type cpu: float + :param gpu: The GPU limit of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, + } + + def __init__(self, **kwargs): + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) + self.gpu = kwargs.get('gpu', None) + + +class ResourceRequests(Model): + """The resource requests. + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB of this container + instance. + :type memory_in_gb: float + :param cpu: Required. The CPU request of this container instance. + :type cpu: float + :param gpu: The GPU request of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, + } + + def __init__(self, **kwargs): + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) + self.gpu = kwargs.get('gpu', None) + + +class ResourceRequirements(Model): + """The resource requirements. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. The resource requests of this container + instance. + :type requests: ~azure.mgmt.containerinstance.models.ResourceRequests + :param limits: The resource limits of this container instance. + :type limits: ~azure.mgmt.containerinstance.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, **kwargs): + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = kwargs.get('requests', None) + self.limits = kwargs.get('limits', None) + + +class Usage(Model): + """A single usage result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Unit of the usage result + :vartype unit: str + :ivar current_value: The current usage of the resource + :vartype current_value: int + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: int + :ivar name: The name object of the resource + :vartype name: ~azure.mgmt.containerinstance.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None + + +class UsageName(Model): + """The name object of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource + :vartype value: str + :ivar localized_value: The localized name of the resource + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class Volume(Model): + """The properties of the volume. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the volume. + :type name: str + :param azure_file: The Azure File volume. + :type azure_file: ~azure.mgmt.containerinstance.models.AzureFileVolume + :param empty_dir: The empty directory volume. + :type empty_dir: object + :param secret: The secret volume. + :type secret: dict[str, str] + :param git_repo: The git repo volume. + :type git_repo: ~azure.mgmt.containerinstance.models.GitRepoVolume + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'azure_file': {'key': 'azureFile', 'type': 'AzureFileVolume'}, + 'empty_dir': {'key': 'emptyDir', 'type': 'object'}, + 'secret': {'key': 'secret', 'type': '{str}'}, + 'git_repo': {'key': 'gitRepo', 'type': 'GitRepoVolume'}, + } + + def __init__(self, **kwargs): + super(Volume, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.azure_file = kwargs.get('azure_file', None) + self.empty_dir = kwargs.get('empty_dir', None) + self.secret = kwargs.get('secret', None) + self.git_repo = kwargs.get('git_repo', None) + + +class VolumeMount(Model): + """The properties of the volume mount. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the volume mount. + :type name: str + :param mount_path: Required. The path within the container where the + volume should be mounted. Must not contain colon (:). + :type mount_path: str + :param read_only: The flag indicating whether the volume mount is + read-only. + :type read_only: bool + """ + + _validation = { + 'name': {'required': True}, + 'mount_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VolumeMount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.mount_path = kwargs.get('mount_path', None) + self.read_only = kwargs.get('read_only', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py new file mode 100644 index 000000000000..842659fa6e93 --- /dev/null +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py @@ -0,0 +1,1602 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AzureFileVolume(Model): + """The properties of the Azure File volume. Azure File shares are mounted as + volumes. + + All required parameters must be populated in order to send to Azure. + + :param share_name: Required. The name of the Azure File share to be + mounted as a volume. + :type share_name: str + :param read_only: The flag indicating whether the Azure File shared + mounted as a volume is read-only. + :type read_only: bool + :param storage_account_name: Required. The name of the storage account + that contains the Azure File share. + :type storage_account_name: str + :param storage_account_key: The storage account access key used to access + the Azure File share. + :type storage_account_key: str + """ + + _validation = { + 'share_name': {'required': True}, + 'storage_account_name': {'required': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_key': {'key': 'storageAccountKey', 'type': 'str'}, + } + + def __init__(self, *, share_name: str, storage_account_name: str, read_only: bool=None, storage_account_key: str=None, **kwargs) -> None: + super(AzureFileVolume, self).__init__(**kwargs) + self.share_name = share_name + self.read_only = read_only + self.storage_account_name = storage_account_name + self.storage_account_key = storage_account_key + + +class CachedImages(Model): + """The cached image and OS type. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The OS type of the cached image. + :type os_type: str + :param image: Required. The cached image name. + :type image: str + """ + + _validation = { + 'os_type': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + } + + def __init__(self, *, os_type: str, image: str, **kwargs) -> None: + super(CachedImages, self).__init__(**kwargs) + self.os_type = os_type + self.image = image + + +class Capabilities(Model): + """The regional capabilities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type that this capability describes. + :vartype resource_type: str + :ivar os_type: The OS type that this capability describes. + :vartype os_type: str + :ivar location: The resource location. + :vartype location: str + :ivar ip_address_type: The ip address type that this capability describes. + :vartype ip_address_type: str + :ivar gpu: The GPU sku that this capability describes. + :vartype gpu: str + :ivar capabilities: The supported capabilities. + :vartype capabilities: + ~azure.mgmt.containerinstance.models.CapabilitiesCapabilities + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'os_type': {'readonly': True}, + 'location': {'readonly': True}, + 'ip_address_type': {'readonly': True}, + 'gpu': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'ip_address_type': {'key': 'ipAddressType', 'type': 'str'}, + 'gpu': {'key': 'gpu', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': 'CapabilitiesCapabilities'}, + } + + def __init__(self, **kwargs) -> None: + super(Capabilities, self).__init__(**kwargs) + self.resource_type = None + self.os_type = None + self.location = None + self.ip_address_type = None + self.gpu = None + self.capabilities = None + + +class CapabilitiesCapabilities(Model): + """The supported capabilities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar max_memory_in_gb: The maximum allowed memory request in GB. + :vartype max_memory_in_gb: float + :ivar max_cpu: The maximum allowed CPU request in cores. + :vartype max_cpu: float + :ivar max_gpu_count: The maximum allowed GPU count. + :vartype max_gpu_count: float + """ + + _validation = { + 'max_memory_in_gb': {'readonly': True}, + 'max_cpu': {'readonly': True}, + 'max_gpu_count': {'readonly': True}, + } + + _attribute_map = { + 'max_memory_in_gb': {'key': 'maxMemoryInGB', 'type': 'float'}, + 'max_cpu': {'key': 'maxCpu', 'type': 'float'}, + 'max_gpu_count': {'key': 'maxGpuCount', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(CapabilitiesCapabilities, self).__init__(**kwargs) + self.max_memory_in_gb = None + self.max_cpu = None + self.max_gpu_count = None + + +class CloudError(Model): + """An error response from the Container Instance service. + + :param error: + :type error: ~azure.mgmt.containerinstance.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the Container Instance service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerinstance.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Container(Model): + """A container instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The user-provided name of the container instance. + :type name: str + :param image: Required. The name of the image used to create the container + instance. + :type image: str + :param command: The commands to execute within the container instance in + exec form. + :type command: list[str] + :param ports: The exposed ports on the container instance. + :type ports: list[~azure.mgmt.containerinstance.models.ContainerPort] + :param environment_variables: The environment variables to set in the + container instance. + :type environment_variables: + list[~azure.mgmt.containerinstance.models.EnvironmentVariable] + :ivar instance_view: The instance view of the container instance. Only + valid in response. + :vartype instance_view: + ~azure.mgmt.containerinstance.models.ContainerPropertiesInstanceView + :param resources: Required. The resource requirements of the container + instance. + :type resources: ~azure.mgmt.containerinstance.models.ResourceRequirements + :param volume_mounts: The volume mounts available to the container + instance. + :type volume_mounts: + list[~azure.mgmt.containerinstance.models.VolumeMount] + :param liveness_probe: The liveness probe. + :type liveness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe + :param readiness_probe: The readiness probe. + :type readiness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'instance_view': {'readonly': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'properties.image', 'type': 'str'}, + 'command': {'key': 'properties.command', 'type': '[str]'}, + 'ports': {'key': 'properties.ports', 'type': '[ContainerPort]'}, + 'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerPropertiesInstanceView'}, + 'resources': {'key': 'properties.resources', 'type': 'ResourceRequirements'}, + 'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'}, + 'liveness_probe': {'key': 'properties.livenessProbe', 'type': 'ContainerProbe'}, + 'readiness_probe': {'key': 'properties.readinessProbe', 'type': 'ContainerProbe'}, + } + + def __init__(self, *, name: str, image: str, resources, command=None, ports=None, environment_variables=None, volume_mounts=None, liveness_probe=None, readiness_probe=None, **kwargs) -> None: + super(Container, self).__init__(**kwargs) + self.name = name + self.image = image + self.command = command + self.ports = ports + self.environment_variables = environment_variables + self.instance_view = None + self.resources = resources + self.volume_mounts = volume_mounts + self.liveness_probe = liveness_probe + self.readiness_probe = readiness_probe + + +class ContainerExec(Model): + """The container execution command, for liveness or readiness probe. + + :param command: The commands to execute within the container. + :type command: list[str] + """ + + _attribute_map = { + 'command': {'key': 'command', 'type': '[str]'}, + } + + def __init__(self, *, command=None, **kwargs) -> None: + super(ContainerExec, self).__init__(**kwargs) + self.command = command + + +class ContainerExecRequest(Model): + """The container exec request. + + :param command: The command to be executed. + :type command: str + :param terminal_size: The size of the terminal. + :type terminal_size: + ~azure.mgmt.containerinstance.models.ContainerExecRequestTerminalSize + """ + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + 'terminal_size': {'key': 'terminalSize', 'type': 'ContainerExecRequestTerminalSize'}, + } + + def __init__(self, *, command: str=None, terminal_size=None, **kwargs) -> None: + super(ContainerExecRequest, self).__init__(**kwargs) + self.command = command + self.terminal_size = terminal_size + + +class ContainerExecRequestTerminalSize(Model): + """The size of the terminal. + + :param rows: The row size of the terminal + :type rows: int + :param cols: The column size of the terminal + :type cols: int + """ + + _attribute_map = { + 'rows': {'key': 'rows', 'type': 'int'}, + 'cols': {'key': 'cols', 'type': 'int'}, + } + + def __init__(self, *, rows: int=None, cols: int=None, **kwargs) -> None: + super(ContainerExecRequestTerminalSize, self).__init__(**kwargs) + self.rows = rows + self.cols = cols + + +class ContainerExecResponse(Model): + """The information for the container exec command. + + :param web_socket_uri: The uri for the exec websocket. + :type web_socket_uri: str + :param password: The password to start the exec command. + :type password: str + """ + + _attribute_map = { + 'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, web_socket_uri: str=None, password: str=None, **kwargs) -> None: + super(ContainerExecResponse, self).__init__(**kwargs) + self.web_socket_uri = web_socket_uri + self.password = password + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ContainerGroup(Resource): + """A container group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param identity: The identity of the container group, if configured. + :type identity: + ~azure.mgmt.containerinstance.models.ContainerGroupIdentity + :ivar provisioning_state: The provisioning state of the container group. + This only appears in the response. + :vartype provisioning_state: str + :param containers: Required. The containers within the container group. + :type containers: list[~azure.mgmt.containerinstance.models.Container] + :param image_registry_credentials: The image registry credentials by which + the container group is created from. + :type image_registry_credentials: + list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] + :param restart_policy: Restart policy for all containers within the + container group. + - `Always` Always restart + - `OnFailure` Restart on failure + - `Never` Never restart + . Possible values include: 'Always', 'OnFailure', 'Never' + :type restart_policy: str or + ~azure.mgmt.containerinstance.models.ContainerGroupRestartPolicy + :param ip_address: The IP address type of the container group. + :type ip_address: ~azure.mgmt.containerinstance.models.IpAddress + :param os_type: Required. The operating system type required by the + containers in the container group. Possible values include: 'Windows', + 'Linux' + :type os_type: str or + ~azure.mgmt.containerinstance.models.OperatingSystemTypes + :param volumes: The list of volumes that can be mounted by containers in + this container group. + :type volumes: list[~azure.mgmt.containerinstance.models.Volume] + :ivar instance_view: The instance view of the container group. Only valid + in response. + :vartype instance_view: + ~azure.mgmt.containerinstance.models.ContainerGroupPropertiesInstanceView + :param diagnostics: The diagnostic information for a container group. + :type diagnostics: + ~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics + :param network_profile: The network profile information for a container + group. + :type network_profile: + ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile + :param dns_config: The DNS config information for a container group. + :type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration + :param sku: The SKU for a container group. Possible values include: + 'Standard', 'Dedicated' + :type sku: str or ~azure.mgmt.containerinstance.models.ContainerGroupSku + :param encryption_properties: The encryption properties for a container + group. + :type encryption_properties: + ~azure.mgmt.containerinstance.models.EncryptionProperties + :param init_containers: The init containers for a container group. + :type init_containers: + list[~azure.mgmt.containerinstance.models.InitContainerDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'containers': {'required': True}, + 'os_type': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ContainerGroupIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'containers': {'key': 'properties.containers', 'type': '[Container]'}, + 'image_registry_credentials': {'key': 'properties.imageRegistryCredentials', 'type': '[ImageRegistryCredential]'}, + 'restart_policy': {'key': 'properties.restartPolicy', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'IpAddress'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'volumes': {'key': 'properties.volumes', 'type': '[Volume]'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, + 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'encryption_properties': {'key': 'properties.encryptionProperties', 'type': 'EncryptionProperties'}, + 'init_containers': {'key': 'properties.initContainers', 'type': '[InitContainerDefinition]'}, + } + + def __init__(self, *, containers, os_type, location: str=None, tags=None, identity=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, dns_config=None, sku=None, encryption_properties=None, init_containers=None, **kwargs) -> None: + super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.provisioning_state = None + self.containers = containers + self.image_registry_credentials = image_registry_credentials + self.restart_policy = restart_policy + self.ip_address = ip_address + self.os_type = os_type + self.volumes = volumes + self.instance_view = None + self.diagnostics = diagnostics + self.network_profile = network_profile + self.dns_config = dns_config + self.sku = sku + self.encryption_properties = encryption_properties + self.init_containers = init_containers + + +class ContainerGroupDiagnostics(Model): + """Container group diagnostic information. + + :param log_analytics: Container group log analytics information. + :type log_analytics: ~azure.mgmt.containerinstance.models.LogAnalytics + """ + + _attribute_map = { + 'log_analytics': {'key': 'logAnalytics', 'type': 'LogAnalytics'}, + } + + def __init__(self, *, log_analytics=None, **kwargs) -> None: + super(ContainerGroupDiagnostics, self).__init__(**kwargs) + self.log_analytics = log_analytics + + +class ContainerGroupIdentity(Model): + """Identity for the container group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of the container group identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the container group. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the container group. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the container group. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.containerinstance.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the container group. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerinstance.models.ContainerGroupIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ContainerGroupIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ContainerGroupIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ContainerGroupIdentityUserAssignedIdentitiesValue(Model): + """ContainerGroupIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ContainerGroupIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ContainerGroupNetworkProfile(Model): + """Container group network profile information. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The identifier for a network profile. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ContainerGroupNetworkProfile, self).__init__(**kwargs) + self.id = id + + +class ContainerGroupPropertiesInstanceView(Model): + """The instance view of the container group. Only valid in response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar events: The events of this container group. + :vartype events: list[~azure.mgmt.containerinstance.models.Event] + :ivar state: The state of the container group. Only valid in response. + :vartype state: str + """ + + _validation = { + 'events': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'events': {'key': 'events', 'type': '[Event]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ContainerGroupPropertiesInstanceView, self).__init__(**kwargs) + self.events = None + self.state = None + + +class ContainerHttpGet(Model): + """The container Http Get settings, for liveness or readiness probe. + + All required parameters must be populated in order to send to Azure. + + :param path: The path to probe. + :type path: str + :param port: Required. The port number to probe. + :type port: int + :param scheme: The scheme. Possible values include: 'http', 'https' + :type scheme: str or ~azure.mgmt.containerinstance.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__(self, *, port: int, path: str=None, scheme=None, **kwargs) -> None: + super(ContainerHttpGet, self).__init__(**kwargs) + self.path = path + self.port = port + self.scheme = scheme + + +class ContainerPort(Model): + """The port exposed on the container instance. + + All required parameters must be populated in order to send to Azure. + + :param protocol: The protocol associated with the port. Possible values + include: 'TCP', 'UDP' + :type protocol: str or + ~azure.mgmt.containerinstance.models.ContainerNetworkProtocol + :param port: Required. The port number exposed within the container group. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, port: int, protocol=None, **kwargs) -> None: + super(ContainerPort, self).__init__(**kwargs) + self.protocol = protocol + self.port = port + + +class ContainerProbe(Model): + """The container probe, for liveness or readiness. + + :param exec_property: The execution command to probe + :type exec_property: ~azure.mgmt.containerinstance.models.ContainerExec + :param http_get: The Http Get settings to probe + :type http_get: ~azure.mgmt.containerinstance.models.ContainerHttpGet + :param initial_delay_seconds: The initial delay seconds. + :type initial_delay_seconds: int + :param period_seconds: The period seconds. + :type period_seconds: int + :param failure_threshold: The failure threshold. + :type failure_threshold: int + :param success_threshold: The success threshold. + :type success_threshold: int + :param timeout_seconds: The timeout seconds. + :type timeout_seconds: int + """ + + _attribute_map = { + 'exec_property': {'key': 'exec', 'type': 'ContainerExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ContainerHttpGet'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + } + + def __init__(self, *, exec_property=None, http_get=None, initial_delay_seconds: int=None, period_seconds: int=None, failure_threshold: int=None, success_threshold: int=None, timeout_seconds: int=None, **kwargs) -> None: + super(ContainerProbe, self).__init__(**kwargs) + self.exec_property = exec_property + self.http_get = http_get + self.initial_delay_seconds = initial_delay_seconds + self.period_seconds = period_seconds + self.failure_threshold = failure_threshold + self.success_threshold = success_threshold + self.timeout_seconds = timeout_seconds + + +class ContainerPropertiesInstanceView(Model): + """The instance view of the container instance. Only valid in response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar restart_count: The number of times that the container instance has + been restarted. + :vartype restart_count: int + :ivar current_state: Current container instance state. + :vartype current_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar previous_state: Previous container instance state. + :vartype previous_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar events: The events of the container instance. + :vartype events: list[~azure.mgmt.containerinstance.models.Event] + """ + + _validation = { + 'restart_count': {'readonly': True}, + 'current_state': {'readonly': True}, + 'previous_state': {'readonly': True}, + 'events': {'readonly': True}, + } + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[Event]'}, + } + + def __init__(self, **kwargs) -> None: + super(ContainerPropertiesInstanceView, self).__init__(**kwargs) + self.restart_count = None + self.current_state = None + self.previous_state = None + self.events = None + + +class ContainerState(Model): + """The container instance state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar state: The state of the container instance. + :vartype state: str + :ivar start_time: The date-time when the container instance state started. + :vartype start_time: datetime + :ivar exit_code: The container instance exit codes correspond to those + from the `docker run` command. + :vartype exit_code: int + :ivar finish_time: The date-time when the container instance state + finished. + :vartype finish_time: datetime + :ivar detail_status: The human-readable status of the container instance + state. + :vartype detail_status: str + """ + + _validation = { + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'exit_code': {'readonly': True}, + 'finish_time': {'readonly': True}, + 'detail_status': {'readonly': True}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'int'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ContainerState, self).__init__(**kwargs) + self.state = None + self.start_time = None + self.exit_code = None + self.finish_time = None + self.detail_status = None + + +class DnsConfiguration(Model): + """DNS configuration for the container group. + + All required parameters must be populated in order to send to Azure. + + :param name_servers: Required. The DNS servers for the container group. + :type name_servers: list[str] + :param search_domains: The DNS search domains for hostname lookup in the + container group. + :type search_domains: str + :param options: The DNS options for the container group. + :type options: str + """ + + _validation = { + 'name_servers': {'required': True}, + } + + _attribute_map = { + 'name_servers': {'key': 'nameServers', 'type': '[str]'}, + 'search_domains': {'key': 'searchDomains', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'str'}, + } + + def __init__(self, *, name_servers, search_domains: str=None, options: str=None, **kwargs) -> None: + super(DnsConfiguration, self).__init__(**kwargs) + self.name_servers = name_servers + self.search_domains = search_domains + self.options = options + + +class EncryptionProperties(Model): + """The container group encryption properties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. The keyvault base url. + :type vault_base_url: str + :param key_name: Required. The encryption key name. + :type key_name: str + :param key_version: Required. The encryption key version. + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, vault_base_url: str, key_name: str, key_version: str, **kwargs) -> None: + super(EncryptionProperties, self).__init__(**kwargs) + self.vault_base_url = vault_base_url + self.key_name = key_name + self.key_version = key_version + + +class EnvironmentVariable(Model): + """The environment variable to set within the container instance. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. + :type name: str + :param value: The value of the environment variable. + :type value: str + :param secure_value: The value of the secure environment variable. + :type secure_value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'secure_value': {'key': 'secureValue', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str=None, secure_value: str=None, **kwargs) -> None: + super(EnvironmentVariable, self).__init__(**kwargs) + self.name = name + self.value = value + self.secure_value = secure_value + + +class Event(Model): + """A container group or container instance event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The count of the event. + :vartype count: int + :ivar first_timestamp: The date-time of the earliest logged event. + :vartype first_timestamp: datetime + :ivar last_timestamp: The date-time of the latest logged event. + :vartype last_timestamp: datetime + :ivar name: The event name. + :vartype name: str + :ivar message: The event message. + :vartype message: str + :ivar type: The event type. + :vartype type: str + """ + + _validation = { + 'count': {'readonly': True}, + 'first_timestamp': {'readonly': True}, + 'last_timestamp': {'readonly': True}, + 'name': {'readonly': True}, + 'message': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'iso-8601'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Event, self).__init__(**kwargs) + self.count = None + self.first_timestamp = None + self.last_timestamp = None + self.name = None + self.message = None + self.type = None + + +class GitRepoVolume(Model): + """Represents a volume that is populated with the contents of a git + repository. + + All required parameters must be populated in order to send to Azure. + + :param directory: Target directory name. Must not contain or start with + '..'. If '.' is supplied, the volume directory will be the git + repository. Otherwise, if specified, the volume will contain the git + repository in the subdirectory with the given name. + :type directory: str + :param repository: Required. Repository URL + :type repository: str + :param revision: Commit hash for the specified revision. + :type revision: str + """ + + _validation = { + 'repository': {'required': True}, + } + + _attribute_map = { + 'directory': {'key': 'directory', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'str'}, + } + + def __init__(self, *, repository: str, directory: str=None, revision: str=None, **kwargs) -> None: + super(GitRepoVolume, self).__init__(**kwargs) + self.directory = directory + self.repository = repository + self.revision = revision + + +class GpuResource(Model): + """The GPU resource. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The count of the GPU resource. + :type count: int + :param sku: Required. The SKU of the GPU resource. Possible values + include: 'K80', 'P100', 'V100' + :type sku: str or ~azure.mgmt.containerinstance.models.GpuSku + """ + + _validation = { + 'count': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, *, count: int, sku, **kwargs) -> None: + super(GpuResource, self).__init__(**kwargs) + self.count = count + self.sku = sku + + +class ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. The Docker image registry server without a + protocol such as "http" and "https". + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password: The password for the private registry. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, server: str, username: str, password: str=None, **kwargs) -> None: + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = server + self.username = username + self.password = password + + +class InitContainerDefinition(Model): + """The init container definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name for the init container. + :type name: str + :param image: The image of the init container. + :type image: str + :param command: The command to execute within the init container in exec + form. + :type command: list[str] + :param environment_variables: The environment variables to set in the init + container. + :type environment_variables: + list[~azure.mgmt.containerinstance.models.EnvironmentVariable] + :ivar instance_view: The instance view of the init container. Only valid + in response. + :vartype instance_view: + ~azure.mgmt.containerinstance.models.InitContainerPropertiesDefinitionInstanceView + :param volume_mounts: The volume mounts available to the init container. + :type volume_mounts: + list[~azure.mgmt.containerinstance.models.VolumeMount] + """ + + _validation = { + 'name': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'properties.image', 'type': 'str'}, + 'command': {'key': 'properties.command', 'type': '[str]'}, + 'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'InitContainerPropertiesDefinitionInstanceView'}, + 'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'}, + } + + def __init__(self, *, name: str, image: str=None, command=None, environment_variables=None, volume_mounts=None, **kwargs) -> None: + super(InitContainerDefinition, self).__init__(**kwargs) + self.name = name + self.image = image + self.command = command + self.environment_variables = environment_variables + self.instance_view = None + self.volume_mounts = volume_mounts + + +class InitContainerPropertiesDefinitionInstanceView(Model): + """The instance view of the init container. Only valid in response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar restart_count: The number of times that the init container has been + restarted. + :vartype restart_count: int + :ivar current_state: The current state of the init container. + :vartype current_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar previous_state: The previous state of the init container. + :vartype previous_state: + ~azure.mgmt.containerinstance.models.ContainerState + :ivar events: The events of the init container. + :vartype events: list[~azure.mgmt.containerinstance.models.Event] + """ + + _validation = { + 'restart_count': {'readonly': True}, + 'current_state': {'readonly': True}, + 'previous_state': {'readonly': True}, + 'events': {'readonly': True}, + } + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[Event]'}, + } + + def __init__(self, **kwargs) -> None: + super(InitContainerPropertiesDefinitionInstanceView, self).__init__(**kwargs) + self.restart_count = None + self.current_state = None + self.previous_state = None + self.events = None + + +class IpAddress(Model): + """IP address for the container group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param ports: Required. The list of ports exposed on the container group. + :type ports: list[~azure.mgmt.containerinstance.models.Port] + :param type: Required. Specifies if the IP is exposed to the public + internet or private VNET. Possible values include: 'Public', 'Private' + :type type: str or + ~azure.mgmt.containerinstance.models.ContainerGroupIpAddressType + :param ip: The IP exposed to the public internet. + :type ip: str + :param dns_name_label: The Dns name label for the IP. + :type dns_name_label: str + :ivar fqdn: The FQDN for the IP. + :vartype fqdn: str + """ + + _validation = { + 'ports': {'required': True}, + 'type': {'required': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'ports': {'key': 'ports', 'type': '[Port]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + 'dns_name_label': {'key': 'dnsNameLabel', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__(self, *, ports, type, ip: str=None, dns_name_label: str=None, **kwargs) -> None: + super(IpAddress, self).__init__(**kwargs) + self.ports = ports + self.type = type + self.ip = ip + self.dns_name_label = dns_name_label + self.fqdn = None + + +class LogAnalytics(Model): + """Container group log analytics information. + + All required parameters must be populated in order to send to Azure. + + :param workspace_id: Required. The workspace id for log analytics + :type workspace_id: str + :param workspace_key: Required. The workspace key for log analytics + :type workspace_key: str + :param log_type: The log type to be used. Possible values include: + 'ContainerInsights', 'ContainerInstanceLogs' + :type log_type: str or + ~azure.mgmt.containerinstance.models.LogAnalyticsLogType + :param metadata: Metadata for log analytics. + :type metadata: dict[str, str] + """ + + _validation = { + 'workspace_id': {'required': True}, + 'workspace_key': {'required': True}, + } + + _attribute_map = { + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'workspace_key': {'key': 'workspaceKey', 'type': 'str'}, + 'log_type': {'key': 'logType', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '{str}'}, + } + + def __init__(self, *, workspace_id: str, workspace_key: str, log_type=None, metadata=None, **kwargs) -> None: + super(LogAnalytics, self).__init__(**kwargs) + self.workspace_id = workspace_id + self.workspace_key = workspace_key + self.log_type = log_type + self.metadata = metadata + + +class Logs(Model): + """The logs. + + :param content: The content of the log. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, content: str=None, **kwargs) -> None: + super(Logs, self).__init__(**kwargs) + self.content = content + + +class Operation(Model): + """An operation for Azure Container Instance service. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the operation. + :type name: str + :param display: Required. The display information of the operation. + :type display: ~azure.mgmt.containerinstance.models.OperationDisplay + :param properties: The additional properties. + :type properties: object + :param origin: The intended executor of the operation. Possible values + include: 'User', 'System' + :type origin: str or + ~azure.mgmt.containerinstance.models.ContainerInstanceOperationsOrigin + """ + + _validation = { + 'name': {'required': True}, + 'display': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, name: str, display, properties=None, origin=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.properties = properties + self.origin = origin + + +class OperationDisplay(Model): + """The display information of the operation. + + :param provider: The name of the provider of the operation. + :type provider: str + :param resource: The name of the resource type of the operation. + :type resource: str + :param operation: The friendly name of the operation. + :type operation: str + :param description: The description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Port(Model): + """The port exposed on the container group. + + All required parameters must be populated in order to send to Azure. + + :param protocol: The protocol associated with the port. Possible values + include: 'TCP', 'UDP' + :type protocol: str or + ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProtocol + :param port: Required. The port number. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, port: int, protocol=None, **kwargs) -> None: + super(Port, self).__init__(**kwargs) + self.protocol = protocol + self.port = port + + +class ResourceLimits(Model): + """The resource limits. + + :param memory_in_gb: The memory limit in GB of this container instance. + :type memory_in_gb: float + :param cpu: The CPU limit of this container instance. + :type cpu: float + :param gpu: The GPU limit of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, + } + + def __init__(self, *, memory_in_gb: float=None, cpu: float=None, gpu=None, **kwargs) -> None: + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu + self.gpu = gpu + + +class ResourceRequests(Model): + """The resource requests. + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB of this container + instance. + :type memory_in_gb: float + :param cpu: Required. The CPU request of this container instance. + :type cpu: float + :param gpu: The GPU request of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, + } + + def __init__(self, *, memory_in_gb: float, cpu: float, gpu=None, **kwargs) -> None: + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu + self.gpu = gpu + + +class ResourceRequirements(Model): + """The resource requirements. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. The resource requests of this container + instance. + :type requests: ~azure.mgmt.containerinstance.models.ResourceRequests + :param limits: The resource limits of this container instance. + :type limits: ~azure.mgmt.containerinstance.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, *, requests, limits=None, **kwargs) -> None: + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = requests + self.limits = limits + + +class Usage(Model): + """A single usage result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Unit of the usage result + :vartype unit: str + :ivar current_value: The current usage of the resource + :vartype current_value: int + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: int + :ivar name: The name object of the resource + :vartype name: ~azure.mgmt.containerinstance.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None + + +class UsageName(Model): + """The name object of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource + :vartype value: str + :ivar localized_value: The localized name of the resource + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class Volume(Model): + """The properties of the volume. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the volume. + :type name: str + :param azure_file: The Azure File volume. + :type azure_file: ~azure.mgmt.containerinstance.models.AzureFileVolume + :param empty_dir: The empty directory volume. + :type empty_dir: object + :param secret: The secret volume. + :type secret: dict[str, str] + :param git_repo: The git repo volume. + :type git_repo: ~azure.mgmt.containerinstance.models.GitRepoVolume + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'azure_file': {'key': 'azureFile', 'type': 'AzureFileVolume'}, + 'empty_dir': {'key': 'emptyDir', 'type': 'object'}, + 'secret': {'key': 'secret', 'type': '{str}'}, + 'git_repo': {'key': 'gitRepo', 'type': 'GitRepoVolume'}, + } + + def __init__(self, *, name: str, azure_file=None, empty_dir=None, secret=None, git_repo=None, **kwargs) -> None: + super(Volume, self).__init__(**kwargs) + self.name = name + self.azure_file = azure_file + self.empty_dir = empty_dir + self.secret = secret + self.git_repo = git_repo + + +class VolumeMount(Model): + """The properties of the volume mount. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the volume mount. + :type name: str + :param mount_path: Required. The path within the container where the + volume should be mounted. Must not contain colon (:). + :type mount_path: str + :param read_only: The flag indicating whether the volume mount is + read-only. + :type read_only: bool + """ + + _validation = { + 'name': {'required': True}, + 'mount_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + } + + def __init__(self, *, name: str, mount_path: str, read_only: bool=None, **kwargs) -> None: + super(VolumeMount, self).__init__(**kwargs) + self.name = name + self.mount_path = mount_path + self.read_only = read_only diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_paged_models.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_paged_models.py new file mode 100644 index 000000000000..7b5864172224 --- /dev/null +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_paged_models.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ContainerGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContainerGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContainerGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ContainerGroupPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class CachedImagesPaged(Paged): + """ + A paging container for iterating over a list of :class:`CachedImages ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CachedImages]'} + } + + def __init__(self, *args, **kwargs): + + super(CachedImagesPaged, self).__init__(*args, **kwargs) +class CapabilitiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`Capabilities ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Capabilities]'} + } + + def __init__(self, *args, **kwargs): + + super(CapabilitiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume.py deleted file mode 100644 index 55b2b20e70b4..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AzureFileVolume(Model): - """The properties of the Azure File volume. Azure File shares are mounted as - volumes. - - All required parameters must be populated in order to send to Azure. - - :param share_name: Required. The name of the Azure File share to be - mounted as a volume. - :type share_name: str - :param read_only: The flag indicating whether the Azure File shared - mounted as a volume is read-only. - :type read_only: bool - :param storage_account_name: Required. The name of the storage account - that contains the Azure File share. - :type storage_account_name: str - :param storage_account_key: The storage account access key used to access - the Azure File share. - :type storage_account_key: str - """ - - _validation = { - 'share_name': {'required': True}, - 'storage_account_name': {'required': True}, - } - - _attribute_map = { - 'share_name': {'key': 'shareName', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, - 'storage_account_key': {'key': 'storageAccountKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureFileVolume, self).__init__(**kwargs) - self.share_name = kwargs.get('share_name', None) - self.read_only = kwargs.get('read_only', None) - self.storage_account_name = kwargs.get('storage_account_name', None) - self.storage_account_key = kwargs.get('storage_account_key', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume_py3.py deleted file mode 100644 index 7d1d6714f96a..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/azure_file_volume_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AzureFileVolume(Model): - """The properties of the Azure File volume. Azure File shares are mounted as - volumes. - - All required parameters must be populated in order to send to Azure. - - :param share_name: Required. The name of the Azure File share to be - mounted as a volume. - :type share_name: str - :param read_only: The flag indicating whether the Azure File shared - mounted as a volume is read-only. - :type read_only: bool - :param storage_account_name: Required. The name of the storage account - that contains the Azure File share. - :type storage_account_name: str - :param storage_account_key: The storage account access key used to access - the Azure File share. - :type storage_account_key: str - """ - - _validation = { - 'share_name': {'required': True}, - 'storage_account_name': {'required': True}, - } - - _attribute_map = { - 'share_name': {'key': 'shareName', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, - 'storage_account_key': {'key': 'storageAccountKey', 'type': 'str'}, - } - - def __init__(self, *, share_name: str, storage_account_name: str, read_only: bool=None, storage_account_key: str=None, **kwargs) -> None: - super(AzureFileVolume, self).__init__(**kwargs) - self.share_name = share_name - self.read_only = read_only - self.storage_account_name = storage_account_name - self.storage_account_key = storage_account_key diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images.py deleted file mode 100644 index 9018c5622062..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CachedImages(Model): - """The cached image and OS type. - - All required parameters must be populated in order to send to Azure. - - :param id: The resource Id of the cached image. - :type id: str - :param os_type: Required. The OS type of the cached image. - :type os_type: str - :param image: Required. The cached image name. - :type image: str - """ - - _validation = { - 'os_type': {'required': True}, - 'image': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CachedImages, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result.py deleted file mode 100644 index 0f0c26bd8ba0..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CachedImagesListResult(Model): - """The response containing cached images. - - :param value: The list of cached images. - :type value: list[~azure.mgmt.containerinstance.models.CachedImages] - :param next_link: The URI to fetch the next page of cached images. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CachedImages]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CachedImagesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result_py3.py deleted file mode 100644 index 7cec9aa2417d..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_list_result_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CachedImagesListResult(Model): - """The response containing cached images. - - :param value: The list of cached images. - :type value: list[~azure.mgmt.containerinstance.models.CachedImages] - :param next_link: The URI to fetch the next page of cached images. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CachedImages]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(CachedImagesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_py3.py deleted file mode 100644 index beb9fd972dcc..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/cached_images_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CachedImages(Model): - """The cached image and OS type. - - All required parameters must be populated in order to send to Azure. - - :param id: The resource Id of the cached image. - :type id: str - :param os_type: Required. The OS type of the cached image. - :type os_type: str - :param image: Required. The cached image name. - :type image: str - """ - - _validation = { - 'os_type': {'required': True}, - 'image': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - } - - def __init__(self, *, os_type: str, image: str, id: str=None, **kwargs) -> None: - super(CachedImages, self).__init__(**kwargs) - self.id = id - self.os_type = os_type - self.image = image diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities.py deleted file mode 100644 index dd2a197cf38f..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Capabilities(Model): - """The regional capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The resource type that this capability describes. - :vartype resource_type: str - :ivar os_type: The OS type that this capability describes. - :vartype os_type: str - :ivar location: The resource location. - :vartype location: str - :ivar ip_address_type: The ip address type that this capability describes. - :vartype ip_address_type: str - :ivar gpu: The GPU sku that this capability describes. - :vartype gpu: str - :ivar capabilities: The supported capabilities. - :vartype capabilities: - ~azure.mgmt.containerinstance.models.CapabilitiesCapabilities - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'os_type': {'readonly': True}, - 'location': {'readonly': True}, - 'ip_address_type': {'readonly': True}, - 'gpu': {'readonly': True}, - 'capabilities': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'ip_address_type': {'key': 'ipAddressType', 'type': 'str'}, - 'gpu': {'key': 'gpu', 'type': 'str'}, - 'capabilities': {'key': 'capabilities', 'type': 'CapabilitiesCapabilities'}, - } - - def __init__(self, **kwargs): - super(Capabilities, self).__init__(**kwargs) - self.resource_type = None - self.os_type = None - self.location = None - self.ip_address_type = None - self.gpu = None - self.capabilities = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities.py deleted file mode 100644 index 5d07d07995dc..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CapabilitiesCapabilities(Model): - """The supported capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar max_memory_in_gb: The maximum allowed memory request in GB. - :vartype max_memory_in_gb: float - :ivar max_cpu: The maximum allowed CPU request in cores. - :vartype max_cpu: float - :ivar max_gpu_count: The maximum allowed GPU count. - :vartype max_gpu_count: float - """ - - _validation = { - 'max_memory_in_gb': {'readonly': True}, - 'max_cpu': {'readonly': True}, - 'max_gpu_count': {'readonly': True}, - } - - _attribute_map = { - 'max_memory_in_gb': {'key': 'maxMemoryInGB', 'type': 'float'}, - 'max_cpu': {'key': 'maxCpu', 'type': 'float'}, - 'max_gpu_count': {'key': 'maxGpuCount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(CapabilitiesCapabilities, self).__init__(**kwargs) - self.max_memory_in_gb = None - self.max_cpu = None - self.max_gpu_count = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities_py3.py deleted file mode 100644 index 292992d86fdf..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_capabilities_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CapabilitiesCapabilities(Model): - """The supported capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar max_memory_in_gb: The maximum allowed memory request in GB. - :vartype max_memory_in_gb: float - :ivar max_cpu: The maximum allowed CPU request in cores. - :vartype max_cpu: float - :ivar max_gpu_count: The maximum allowed GPU count. - :vartype max_gpu_count: float - """ - - _validation = { - 'max_memory_in_gb': {'readonly': True}, - 'max_cpu': {'readonly': True}, - 'max_gpu_count': {'readonly': True}, - } - - _attribute_map = { - 'max_memory_in_gb': {'key': 'maxMemoryInGB', 'type': 'float'}, - 'max_cpu': {'key': 'maxCpu', 'type': 'float'}, - 'max_gpu_count': {'key': 'maxGpuCount', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(CapabilitiesCapabilities, self).__init__(**kwargs) - self.max_memory_in_gb = None - self.max_cpu = None - self.max_gpu_count = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result.py deleted file mode 100644 index d11a161fcdc5..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CapabilitiesListResult(Model): - """The response containing list of capabilities. - - :param value: The list of capabilities. - :type value: list[~azure.mgmt.containerinstance.models.Capabilities] - :param next_link: The URI to fetch the next page of capabilities. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Capabilities]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CapabilitiesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result_py3.py deleted file mode 100644 index 396a636eca4e..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_list_result_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CapabilitiesListResult(Model): - """The response containing list of capabilities. - - :param value: The list of capabilities. - :type value: list[~azure.mgmt.containerinstance.models.Capabilities] - :param next_link: The URI to fetch the next page of capabilities. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Capabilities]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(CapabilitiesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_py3.py deleted file mode 100644 index 69767a4af6ed..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/capabilities_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Capabilities(Model): - """The regional capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The resource type that this capability describes. - :vartype resource_type: str - :ivar os_type: The OS type that this capability describes. - :vartype os_type: str - :ivar location: The resource location. - :vartype location: str - :ivar ip_address_type: The ip address type that this capability describes. - :vartype ip_address_type: str - :ivar gpu: The GPU sku that this capability describes. - :vartype gpu: str - :ivar capabilities: The supported capabilities. - :vartype capabilities: - ~azure.mgmt.containerinstance.models.CapabilitiesCapabilities - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'os_type': {'readonly': True}, - 'location': {'readonly': True}, - 'ip_address_type': {'readonly': True}, - 'gpu': {'readonly': True}, - 'capabilities': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'ip_address_type': {'key': 'ipAddressType', 'type': 'str'}, - 'gpu': {'key': 'gpu', 'type': 'str'}, - 'capabilities': {'key': 'capabilities', 'type': 'CapabilitiesCapabilities'}, - } - - def __init__(self, **kwargs) -> None: - super(Capabilities, self).__init__(**kwargs) - self.resource_type = None - self.os_type = None - self.location = None - self.ip_address_type = None - self.gpu = None - self.capabilities = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container.py deleted file mode 100644 index 98768c78ed4d..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Container(Model): - """A container instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The user-provided name of the container instance. - :type name: str - :param image: Required. The name of the image used to create the container - instance. - :type image: str - :param command: The commands to execute within the container instance in - exec form. - :type command: list[str] - :param ports: The exposed ports on the container instance. - :type ports: list[~azure.mgmt.containerinstance.models.ContainerPort] - :param environment_variables: The environment variables to set in the - container instance. - :type environment_variables: - list[~azure.mgmt.containerinstance.models.EnvironmentVariable] - :ivar instance_view: The instance view of the container instance. Only - valid in response. - :vartype instance_view: - ~azure.mgmt.containerinstance.models.ContainerPropertiesInstanceView - :param resources: Required. The resource requirements of the container - instance. - :type resources: ~azure.mgmt.containerinstance.models.ResourceRequirements - :param volume_mounts: The volume mounts available to the container - instance. - :type volume_mounts: - list[~azure.mgmt.containerinstance.models.VolumeMount] - :param liveness_probe: The liveness probe. - :type liveness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe - :param readiness_probe: The readiness probe. - :type readiness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'instance_view': {'readonly': True}, - 'resources': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'properties.image', 'type': 'str'}, - 'command': {'key': 'properties.command', 'type': '[str]'}, - 'ports': {'key': 'properties.ports', 'type': '[ContainerPort]'}, - 'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerPropertiesInstanceView'}, - 'resources': {'key': 'properties.resources', 'type': 'ResourceRequirements'}, - 'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'}, - 'liveness_probe': {'key': 'properties.livenessProbe', 'type': 'ContainerProbe'}, - 'readiness_probe': {'key': 'properties.readinessProbe', 'type': 'ContainerProbe'}, - } - - def __init__(self, **kwargs): - super(Container, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.image = kwargs.get('image', None) - self.command = kwargs.get('command', None) - self.ports = kwargs.get('ports', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.instance_view = None - self.resources = kwargs.get('resources', None) - self.volume_mounts = kwargs.get('volume_mounts', None) - self.liveness_probe = kwargs.get('liveness_probe', None) - self.readiness_probe = kwargs.get('readiness_probe', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec.py deleted file mode 100644 index 2fe3dabdd9d9..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExec(Model): - """The container execution command, for liveness or readiness probe. - - :param command: The commands to execute within the container. - :type command: list[str] - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ContainerExec, self).__init__(**kwargs) - self.command = kwargs.get('command', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_py3.py deleted file mode 100644 index 6e6d96e30374..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExec(Model): - """The container execution command, for liveness or readiness probe. - - :param command: The commands to execute within the container. - :type command: list[str] - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': '[str]'}, - } - - def __init__(self, *, command=None, **kwargs) -> None: - super(ContainerExec, self).__init__(**kwargs) - self.command = command diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request.py deleted file mode 100644 index f9d7392bbfdc..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExecRequest(Model): - """The container exec request. - - :param command: The command to be executed. - :type command: str - :param terminal_size: The size of the terminal. - :type terminal_size: - ~azure.mgmt.containerinstance.models.ContainerExecRequestTerminalSize - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'terminal_size': {'key': 'terminalSize', 'type': 'ContainerExecRequestTerminalSize'}, - } - - def __init__(self, **kwargs): - super(ContainerExecRequest, self).__init__(**kwargs) - self.command = kwargs.get('command', None) - self.terminal_size = kwargs.get('terminal_size', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_py3.py deleted file mode 100644 index 5b49de214131..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExecRequest(Model): - """The container exec request. - - :param command: The command to be executed. - :type command: str - :param terminal_size: The size of the terminal. - :type terminal_size: - ~azure.mgmt.containerinstance.models.ContainerExecRequestTerminalSize - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'terminal_size': {'key': 'terminalSize', 'type': 'ContainerExecRequestTerminalSize'}, - } - - def __init__(self, *, command: str=None, terminal_size=None, **kwargs) -> None: - super(ContainerExecRequest, self).__init__(**kwargs) - self.command = command - self.terminal_size = terminal_size diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size.py deleted file mode 100644 index 94acd92ba917..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExecRequestTerminalSize(Model): - """The size of the terminal. - - :param rows: The row size of the terminal - :type rows: int - :param cols: The column size of the terminal - :type cols: int - """ - - _attribute_map = { - 'rows': {'key': 'rows', 'type': 'int'}, - 'cols': {'key': 'cols', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ContainerExecRequestTerminalSize, self).__init__(**kwargs) - self.rows = kwargs.get('rows', None) - self.cols = kwargs.get('cols', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size_py3.py deleted file mode 100644 index 481fd4aaaaa5..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_request_terminal_size_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExecRequestTerminalSize(Model): - """The size of the terminal. - - :param rows: The row size of the terminal - :type rows: int - :param cols: The column size of the terminal - :type cols: int - """ - - _attribute_map = { - 'rows': {'key': 'rows', 'type': 'int'}, - 'cols': {'key': 'cols', 'type': 'int'}, - } - - def __init__(self, *, rows: int=None, cols: int=None, **kwargs) -> None: - super(ContainerExecRequestTerminalSize, self).__init__(**kwargs) - self.rows = rows - self.cols = cols diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response.py deleted file mode 100644 index a894399a1d96..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExecResponse(Model): - """The information for the container exec command. - - :param web_socket_uri: The uri for the exec websocket. - :type web_socket_uri: str - :param password: The password to start the exec command. - :type password: str - """ - - _attribute_map = { - 'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerExecResponse, self).__init__(**kwargs) - self.web_socket_uri = kwargs.get('web_socket_uri', None) - self.password = kwargs.get('password', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response_py3.py deleted file mode 100644 index 9318680514a4..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_exec_response_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerExecResponse(Model): - """The information for the container exec command. - - :param web_socket_uri: The uri for the exec websocket. - :type web_socket_uri: str - :param password: The password to start the exec command. - :type password: str - """ - - _attribute_map = { - 'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, *, web_socket_uri: str=None, password: str=None, **kwargs) -> None: - super(ContainerExecResponse, self).__init__(**kwargs) - self.web_socket_uri = web_socket_uri - self.password = password diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py deleted file mode 100644 index 94962b923a53..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ContainerGroup(Resource): - """A container group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param identity: The identity of the container group, if configured. - :type identity: - ~azure.mgmt.containerinstance.models.ContainerGroupIdentity - :ivar provisioning_state: The provisioning state of the container group. - This only appears in the response. - :vartype provisioning_state: str - :param containers: Required. The containers within the container group. - :type containers: list[~azure.mgmt.containerinstance.models.Container] - :param image_registry_credentials: The image registry credentials by which - the container group is created from. - :type image_registry_credentials: - list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] - :param restart_policy: Restart policy for all containers within the - container group. - - `Always` Always restart - - `OnFailure` Restart on failure - - `Never` Never restart - . Possible values include: 'Always', 'OnFailure', 'Never' - :type restart_policy: str or - ~azure.mgmt.containerinstance.models.ContainerGroupRestartPolicy - :param ip_address: The IP address type of the container group. - :type ip_address: ~azure.mgmt.containerinstance.models.IpAddress - :param os_type: Required. The operating system type required by the - containers in the container group. Possible values include: 'Windows', - 'Linux' - :type os_type: str or - ~azure.mgmt.containerinstance.models.OperatingSystemTypes - :param volumes: The list of volumes that can be mounted by containers in - this container group. - :type volumes: list[~azure.mgmt.containerinstance.models.Volume] - :ivar instance_view: The instance view of the container group. Only valid - in response. - :vartype instance_view: - ~azure.mgmt.containerinstance.models.ContainerGroupPropertiesInstanceView - :param diagnostics: The diagnostic information for a container group. - :type diagnostics: - ~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics - :param network_profile: The network profile information for a container - group. - :type network_profile: - ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile - :param dns_config: The DNS config information for a container group. - :type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'containers': {'required': True}, - 'os_type': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ContainerGroupIdentity'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'containers': {'key': 'properties.containers', 'type': '[Container]'}, - 'image_registry_credentials': {'key': 'properties.imageRegistryCredentials', 'type': '[ImageRegistryCredential]'}, - 'restart_policy': {'key': 'properties.restartPolicy', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'IpAddress'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'volumes': {'key': 'properties.volumes', 'type': '[Volume]'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, - 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerGroup, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.containers = kwargs.get('containers', None) - self.image_registry_credentials = kwargs.get('image_registry_credentials', None) - self.restart_policy = kwargs.get('restart_policy', None) - self.ip_address = kwargs.get('ip_address', None) - self.os_type = kwargs.get('os_type', None) - self.volumes = kwargs.get('volumes', None) - self.instance_view = None - self.diagnostics = kwargs.get('diagnostics', None) - self.network_profile = kwargs.get('network_profile', None) - self.dns_config = kwargs.get('dns_config', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics.py deleted file mode 100644 index c393dde8f7b8..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupDiagnostics(Model): - """Container group diagnostic information. - - :param log_analytics: Container group log analytics information. - :type log_analytics: ~azure.mgmt.containerinstance.models.LogAnalytics - """ - - _attribute_map = { - 'log_analytics': {'key': 'logAnalytics', 'type': 'LogAnalytics'}, - } - - def __init__(self, **kwargs): - super(ContainerGroupDiagnostics, self).__init__(**kwargs) - self.log_analytics = kwargs.get('log_analytics', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics_py3.py deleted file mode 100644 index fb5fee21a034..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_diagnostics_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupDiagnostics(Model): - """Container group diagnostic information. - - :param log_analytics: Container group log analytics information. - :type log_analytics: ~azure.mgmt.containerinstance.models.LogAnalytics - """ - - _attribute_map = { - 'log_analytics': {'key': 'logAnalytics', 'type': 'LogAnalytics'}, - } - - def __init__(self, *, log_analytics=None, **kwargs) -> None: - super(ContainerGroupDiagnostics, self).__init__(**kwargs) - self.log_analytics = log_analytics diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity.py deleted file mode 100644 index 3669c19aa62a..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupIdentity(Model): - """Identity for the container group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the container group identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the container group. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the container group. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the container group. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerinstance.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the container group. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerinstance.models.ContainerGroupIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ContainerGroupIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ContainerGroupIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_py3.py deleted file mode 100644 index 53ca40da721e..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupIdentity(Model): - """Identity for the container group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the container group identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the container group. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the container group. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the container group. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerinstance.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the container group. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerinstance.models.ContainerGroupIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ContainerGroupIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ContainerGroupIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value.py deleted file mode 100644 index 7e1d1b9f4282..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupIdentityUserAssignedIdentitiesValue(Model): - """ContainerGroupIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerGroupIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 24cf7baa0e45..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupIdentityUserAssignedIdentitiesValue(Model): - """ContainerGroupIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ContainerGroupIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py deleted file mode 100644 index 026387cb17a8..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupNetworkProfile(Model): - """Container group network profile information. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The identifier for a network profile. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerGroupNetworkProfile, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py deleted file mode 100644 index 72e54d274eec..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupNetworkProfile(Model): - """Container group network profile information. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The identifier for a network profile. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ContainerGroupNetworkProfile, self).__init__(**kwargs) - self.id = id diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_paged.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_paged.py deleted file mode 100644 index 704fc5e670a3..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ContainerGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`ContainerGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContainerGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(ContainerGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view.py deleted file mode 100644 index 1bdf0f7da3e9..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupPropertiesInstanceView(Model): - """The instance view of the container group. Only valid in response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar events: The events of this container group. - :vartype events: list[~azure.mgmt.containerinstance.models.Event] - :ivar state: The state of the container group. Only valid in response. - :vartype state: str - """ - - _validation = { - 'events': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'events': {'key': 'events', 'type': '[Event]'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerGroupPropertiesInstanceView, self).__init__(**kwargs) - self.events = None - self.state = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view_py3.py deleted file mode 100644 index 69d83391e0b4..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_properties_instance_view_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerGroupPropertiesInstanceView(Model): - """The instance view of the container group. Only valid in response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar events: The events of this container group. - :vartype events: list[~azure.mgmt.containerinstance.models.Event] - :ivar state: The state of the container group. Only valid in response. - :vartype state: str - """ - - _validation = { - 'events': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'events': {'key': 'events', 'type': '[Event]'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ContainerGroupPropertiesInstanceView, self).__init__(**kwargs) - self.events = None - self.state = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py deleted file mode 100644 index 2c31e749d5bd..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ContainerGroup(Resource): - """A container group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param identity: The identity of the container group, if configured. - :type identity: - ~azure.mgmt.containerinstance.models.ContainerGroupIdentity - :ivar provisioning_state: The provisioning state of the container group. - This only appears in the response. - :vartype provisioning_state: str - :param containers: Required. The containers within the container group. - :type containers: list[~azure.mgmt.containerinstance.models.Container] - :param image_registry_credentials: The image registry credentials by which - the container group is created from. - :type image_registry_credentials: - list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] - :param restart_policy: Restart policy for all containers within the - container group. - - `Always` Always restart - - `OnFailure` Restart on failure - - `Never` Never restart - . Possible values include: 'Always', 'OnFailure', 'Never' - :type restart_policy: str or - ~azure.mgmt.containerinstance.models.ContainerGroupRestartPolicy - :param ip_address: The IP address type of the container group. - :type ip_address: ~azure.mgmt.containerinstance.models.IpAddress - :param os_type: Required. The operating system type required by the - containers in the container group. Possible values include: 'Windows', - 'Linux' - :type os_type: str or - ~azure.mgmt.containerinstance.models.OperatingSystemTypes - :param volumes: The list of volumes that can be mounted by containers in - this container group. - :type volumes: list[~azure.mgmt.containerinstance.models.Volume] - :ivar instance_view: The instance view of the container group. Only valid - in response. - :vartype instance_view: - ~azure.mgmt.containerinstance.models.ContainerGroupPropertiesInstanceView - :param diagnostics: The diagnostic information for a container group. - :type diagnostics: - ~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics - :param network_profile: The network profile information for a container - group. - :type network_profile: - ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile - :param dns_config: The DNS config information for a container group. - :type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'containers': {'required': True}, - 'os_type': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ContainerGroupIdentity'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'containers': {'key': 'properties.containers', 'type': '[Container]'}, - 'image_registry_credentials': {'key': 'properties.imageRegistryCredentials', 'type': '[ImageRegistryCredential]'}, - 'restart_policy': {'key': 'properties.restartPolicy', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'IpAddress'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'volumes': {'key': 'properties.volumes', 'type': '[Volume]'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, - 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'}, - } - - def __init__(self, *, containers, os_type, location: str=None, tags=None, identity=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, dns_config=None, **kwargs) -> None: - super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.provisioning_state = None - self.containers = containers - self.image_registry_credentials = image_registry_credentials - self.restart_policy = restart_policy - self.ip_address = ip_address - self.os_type = os_type - self.volumes = volumes - self.instance_view = None - self.diagnostics = diagnostics - self.network_profile = network_profile - self.dns_config = dns_config diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get.py deleted file mode 100644 index 1823b1a315fb..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerHttpGet(Model): - """The container Http Get settings, for liveness or readiness probe. - - All required parameters must be populated in order to send to Azure. - - :param path: The path to probe. - :type path: str - :param port: Required. The port number to probe. - :type port: int - :param scheme: The scheme. Possible values include: 'http', 'https' - :type scheme: str or ~azure.mgmt.containerinstance.models.enum - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerHttpGet, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.port = kwargs.get('port', None) - self.scheme = kwargs.get('scheme', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get_py3.py deleted file mode 100644 index d9ca73f63818..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_http_get_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerHttpGet(Model): - """The container Http Get settings, for liveness or readiness probe. - - All required parameters must be populated in order to send to Azure. - - :param path: The path to probe. - :type path: str - :param port: Required. The port number to probe. - :type port: int - :param scheme: The scheme. Possible values include: 'http', 'https' - :type scheme: str or ~azure.mgmt.containerinstance.models.enum - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__(self, *, port: int, path: str=None, scheme=None, **kwargs) -> None: - super(ContainerHttpGet, self).__init__(**kwargs) - self.path = path - self.port = port - self.scheme = scheme diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port.py deleted file mode 100644 index 8920c7daaef0..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerPort(Model): - """The port exposed on the container instance. - - All required parameters must be populated in order to send to Azure. - - :param protocol: The protocol associated with the port. Possible values - include: 'TCP', 'UDP' - :type protocol: str or - ~azure.mgmt.containerinstance.models.ContainerNetworkProtocol - :param port: Required. The port number exposed within the container group. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ContainerPort, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.port = kwargs.get('port', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port_py3.py deleted file mode 100644 index c5085347de4d..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_port_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerPort(Model): - """The port exposed on the container instance. - - All required parameters must be populated in order to send to Azure. - - :param protocol: The protocol associated with the port. Possible values - include: 'TCP', 'UDP' - :type protocol: str or - ~azure.mgmt.containerinstance.models.ContainerNetworkProtocol - :param port: Required. The port number exposed within the container group. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, *, port: int, protocol=None, **kwargs) -> None: - super(ContainerPort, self).__init__(**kwargs) - self.protocol = protocol - self.port = port diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe.py deleted file mode 100644 index 884447e44a81..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerProbe(Model): - """The container probe, for liveness or readiness. - - :param exec_property: The execution command to probe - :type exec_property: ~azure.mgmt.containerinstance.models.ContainerExec - :param http_get: The Http Get settings to probe - :type http_get: ~azure.mgmt.containerinstance.models.ContainerHttpGet - :param initial_delay_seconds: The initial delay seconds. - :type initial_delay_seconds: int - :param period_seconds: The period seconds. - :type period_seconds: int - :param failure_threshold: The failure threshold. - :type failure_threshold: int - :param success_threshold: The success threshold. - :type success_threshold: int - :param timeout_seconds: The timeout seconds. - :type timeout_seconds: int - """ - - _attribute_map = { - 'exec_property': {'key': 'exec', 'type': 'ContainerExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ContainerHttpGet'}, - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ContainerProbe, self).__init__(**kwargs) - self.exec_property = kwargs.get('exec_property', None) - self.http_get = kwargs.get('http_get', None) - self.initial_delay_seconds = kwargs.get('initial_delay_seconds', None) - self.period_seconds = kwargs.get('period_seconds', None) - self.failure_threshold = kwargs.get('failure_threshold', None) - self.success_threshold = kwargs.get('success_threshold', None) - self.timeout_seconds = kwargs.get('timeout_seconds', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe_py3.py deleted file mode 100644 index 67d0046da16f..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_probe_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerProbe(Model): - """The container probe, for liveness or readiness. - - :param exec_property: The execution command to probe - :type exec_property: ~azure.mgmt.containerinstance.models.ContainerExec - :param http_get: The Http Get settings to probe - :type http_get: ~azure.mgmt.containerinstance.models.ContainerHttpGet - :param initial_delay_seconds: The initial delay seconds. - :type initial_delay_seconds: int - :param period_seconds: The period seconds. - :type period_seconds: int - :param failure_threshold: The failure threshold. - :type failure_threshold: int - :param success_threshold: The success threshold. - :type success_threshold: int - :param timeout_seconds: The timeout seconds. - :type timeout_seconds: int - """ - - _attribute_map = { - 'exec_property': {'key': 'exec', 'type': 'ContainerExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ContainerHttpGet'}, - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - } - - def __init__(self, *, exec_property=None, http_get=None, initial_delay_seconds: int=None, period_seconds: int=None, failure_threshold: int=None, success_threshold: int=None, timeout_seconds: int=None, **kwargs) -> None: - super(ContainerProbe, self).__init__(**kwargs) - self.exec_property = exec_property - self.http_get = http_get - self.initial_delay_seconds = initial_delay_seconds - self.period_seconds = period_seconds - self.failure_threshold = failure_threshold - self.success_threshold = success_threshold - self.timeout_seconds = timeout_seconds diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view.py deleted file mode 100644 index 0f15799863d1..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerPropertiesInstanceView(Model): - """The instance view of the container instance. Only valid in response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar restart_count: The number of times that the container instance has - been restarted. - :vartype restart_count: int - :ivar current_state: Current container instance state. - :vartype current_state: - ~azure.mgmt.containerinstance.models.ContainerState - :ivar previous_state: Previous container instance state. - :vartype previous_state: - ~azure.mgmt.containerinstance.models.ContainerState - :ivar events: The events of the container instance. - :vartype events: list[~azure.mgmt.containerinstance.models.Event] - """ - - _validation = { - 'restart_count': {'readonly': True}, - 'current_state': {'readonly': True}, - 'previous_state': {'readonly': True}, - 'events': {'readonly': True}, - } - - _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[Event]'}, - } - - def __init__(self, **kwargs): - super(ContainerPropertiesInstanceView, self).__init__(**kwargs) - self.restart_count = None - self.current_state = None - self.previous_state = None - self.events = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view_py3.py deleted file mode 100644 index a371bbb49f4a..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_properties_instance_view_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerPropertiesInstanceView(Model): - """The instance view of the container instance. Only valid in response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar restart_count: The number of times that the container instance has - been restarted. - :vartype restart_count: int - :ivar current_state: Current container instance state. - :vartype current_state: - ~azure.mgmt.containerinstance.models.ContainerState - :ivar previous_state: Previous container instance state. - :vartype previous_state: - ~azure.mgmt.containerinstance.models.ContainerState - :ivar events: The events of the container instance. - :vartype events: list[~azure.mgmt.containerinstance.models.Event] - """ - - _validation = { - 'restart_count': {'readonly': True}, - 'current_state': {'readonly': True}, - 'previous_state': {'readonly': True}, - 'events': {'readonly': True}, - } - - _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[Event]'}, - } - - def __init__(self, **kwargs) -> None: - super(ContainerPropertiesInstanceView, self).__init__(**kwargs) - self.restart_count = None - self.current_state = None - self.previous_state = None - self.events = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_py3.py deleted file mode 100644 index cdcc92593f9b..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Container(Model): - """A container instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The user-provided name of the container instance. - :type name: str - :param image: Required. The name of the image used to create the container - instance. - :type image: str - :param command: The commands to execute within the container instance in - exec form. - :type command: list[str] - :param ports: The exposed ports on the container instance. - :type ports: list[~azure.mgmt.containerinstance.models.ContainerPort] - :param environment_variables: The environment variables to set in the - container instance. - :type environment_variables: - list[~azure.mgmt.containerinstance.models.EnvironmentVariable] - :ivar instance_view: The instance view of the container instance. Only - valid in response. - :vartype instance_view: - ~azure.mgmt.containerinstance.models.ContainerPropertiesInstanceView - :param resources: Required. The resource requirements of the container - instance. - :type resources: ~azure.mgmt.containerinstance.models.ResourceRequirements - :param volume_mounts: The volume mounts available to the container - instance. - :type volume_mounts: - list[~azure.mgmt.containerinstance.models.VolumeMount] - :param liveness_probe: The liveness probe. - :type liveness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe - :param readiness_probe: The readiness probe. - :type readiness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'instance_view': {'readonly': True}, - 'resources': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'properties.image', 'type': 'str'}, - 'command': {'key': 'properties.command', 'type': '[str]'}, - 'ports': {'key': 'properties.ports', 'type': '[ContainerPort]'}, - 'environment_variables': {'key': 'properties.environmentVariables', 'type': '[EnvironmentVariable]'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerPropertiesInstanceView'}, - 'resources': {'key': 'properties.resources', 'type': 'ResourceRequirements'}, - 'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'}, - 'liveness_probe': {'key': 'properties.livenessProbe', 'type': 'ContainerProbe'}, - 'readiness_probe': {'key': 'properties.readinessProbe', 'type': 'ContainerProbe'}, - } - - def __init__(self, *, name: str, image: str, resources, command=None, ports=None, environment_variables=None, volume_mounts=None, liveness_probe=None, readiness_probe=None, **kwargs) -> None: - super(Container, self).__init__(**kwargs) - self.name = name - self.image = image - self.command = command - self.ports = ports - self.environment_variables = environment_variables - self.instance_view = None - self.resources = resources - self.volume_mounts = volume_mounts - self.liveness_probe = liveness_probe - self.readiness_probe = readiness_probe diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state.py deleted file mode 100644 index 8b70058cc3ad..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerState(Model): - """The container instance state. - - :param state: The state of the container instance. - :type state: str - :param start_time: The date-time when the container instance state - started. - :type start_time: datetime - :param exit_code: The container instance exit codes correspond to those - from the `docker run` command. - :type exit_code: int - :param finish_time: The date-time when the container instance state - finished. - :type finish_time: datetime - :param detail_status: The human-readable status of the container instance - state. - :type detail_status: str - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'int'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerState, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.start_time = kwargs.get('start_time', None) - self.exit_code = kwargs.get('exit_code', None) - self.finish_time = kwargs.get('finish_time', None) - self.detail_status = kwargs.get('detail_status', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state_py3.py deleted file mode 100644 index 34aa05a015d3..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_state_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerState(Model): - """The container instance state. - - :param state: The state of the container instance. - :type state: str - :param start_time: The date-time when the container instance state - started. - :type start_time: datetime - :param exit_code: The container instance exit codes correspond to those - from the `docker run` command. - :type exit_code: int - :param finish_time: The date-time when the container instance state - finished. - :type finish_time: datetime - :param detail_status: The human-readable status of the container instance - state. - :type detail_status: str - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'int'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, - } - - def __init__(self, *, state: str=None, start_time=None, exit_code: int=None, finish_time=None, detail_status: str=None, **kwargs) -> None: - super(ContainerState, self).__init__(**kwargs) - self.state = state - self.start_time = start_time - self.exit_code = exit_code - self.finish_time = finish_time - self.detail_status = detail_status diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py deleted file mode 100644 index d9775ab31ee1..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DnsConfiguration(Model): - """DNS configuration for the container group. - - All required parameters must be populated in order to send to Azure. - - :param name_servers: Required. The DNS servers for the container group. - :type name_servers: list[str] - :param search_domains: The DNS search domains for hostname lookup in the - container group. - :type search_domains: str - :param options: The DNS options for the container group. - :type options: str - """ - - _validation = { - 'name_servers': {'required': True}, - } - - _attribute_map = { - 'name_servers': {'key': 'nameServers', 'type': '[str]'}, - 'search_domains': {'key': 'searchDomains', 'type': 'str'}, - 'options': {'key': 'options', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DnsConfiguration, self).__init__(**kwargs) - self.name_servers = kwargs.get('name_servers', None) - self.search_domains = kwargs.get('search_domains', None) - self.options = kwargs.get('options', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py deleted file mode 100644 index 73be32358552..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DnsConfiguration(Model): - """DNS configuration for the container group. - - All required parameters must be populated in order to send to Azure. - - :param name_servers: Required. The DNS servers for the container group. - :type name_servers: list[str] - :param search_domains: The DNS search domains for hostname lookup in the - container group. - :type search_domains: str - :param options: The DNS options for the container group. - :type options: str - """ - - _validation = { - 'name_servers': {'required': True}, - } - - _attribute_map = { - 'name_servers': {'key': 'nameServers', 'type': '[str]'}, - 'search_domains': {'key': 'searchDomains', 'type': 'str'}, - 'options': {'key': 'options', 'type': 'str'}, - } - - def __init__(self, *, name_servers, search_domains: str=None, options: str=None, **kwargs) -> None: - super(DnsConfiguration, self).__init__(**kwargs) - self.name_servers = name_servers - self.search_domains = search_domains - self.options = options diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable.py deleted file mode 100644 index d92e7d8bb730..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentVariable(Model): - """The environment variable to set within the container instance. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the environment variable. - :type name: str - :param value: The value of the environment variable. - :type value: str - :param secure_value: The value of the secure environment variable. - :type secure_value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'secure_value': {'key': 'secureValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnvironmentVariable, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.secure_value = kwargs.get('secure_value', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable_py3.py deleted file mode 100644 index 49d6f145b134..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/environment_variable_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentVariable(Model): - """The environment variable to set within the container instance. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the environment variable. - :type name: str - :param value: The value of the environment variable. - :type value: str - :param secure_value: The value of the secure environment variable. - :type secure_value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'secure_value': {'key': 'secureValue', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str=None, secure_value: str=None, **kwargs) -> None: - super(EnvironmentVariable, self).__init__(**kwargs) - self.name = name - self.value = value - self.secure_value = secure_value diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event.py deleted file mode 100644 index 003d325e358a..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """A container group or container instance event. - - :param count: The count of the event. - :type count: int - :param first_timestamp: The date-time of the earliest logged event. - :type first_timestamp: datetime - :param last_timestamp: The date-time of the latest logged event. - :type last_timestamp: datetime - :param name: The event name. - :type name: str - :param message: The event message. - :type message: str - :param type: The event type. - :type type: str - """ - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'iso-8601'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'iso-8601'}, - 'name': {'key': 'name', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Event, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.first_timestamp = kwargs.get('first_timestamp', None) - self.last_timestamp = kwargs.get('last_timestamp', None) - self.name = kwargs.get('name', None) - self.message = kwargs.get('message', None) - self.type = kwargs.get('type', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event_py3.py deleted file mode 100644 index 43aa706c89ca..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/event_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """A container group or container instance event. - - :param count: The count of the event. - :type count: int - :param first_timestamp: The date-time of the earliest logged event. - :type first_timestamp: datetime - :param last_timestamp: The date-time of the latest logged event. - :type last_timestamp: datetime - :param name: The event name. - :type name: str - :param message: The event message. - :type message: str - :param type: The event type. - :type type: str - """ - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'iso-8601'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'iso-8601'}, - 'name': {'key': 'name', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, first_timestamp=None, last_timestamp=None, name: str=None, message: str=None, type: str=None, **kwargs) -> None: - super(Event, self).__init__(**kwargs) - self.count = count - self.first_timestamp = first_timestamp - self.last_timestamp = last_timestamp - self.name = name - self.message = message - self.type = type diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume.py deleted file mode 100644 index f940ef6351e4..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GitRepoVolume(Model): - """Represents a volume that is populated with the contents of a git - repository. - - All required parameters must be populated in order to send to Azure. - - :param directory: Target directory name. Must not contain or start with - '..'. If '.' is supplied, the volume directory will be the git - repository. Otherwise, if specified, the volume will contain the git - repository in the subdirectory with the given name. - :type directory: str - :param repository: Required. Repository URL - :type repository: str - :param revision: Commit hash for the specified revision. - :type revision: str - """ - - _validation = { - 'repository': {'required': True}, - } - - _attribute_map = { - 'directory': {'key': 'directory', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GitRepoVolume, self).__init__(**kwargs) - self.directory = kwargs.get('directory', None) - self.repository = kwargs.get('repository', None) - self.revision = kwargs.get('revision', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume_py3.py deleted file mode 100644 index c354e20e5384..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/git_repo_volume_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GitRepoVolume(Model): - """Represents a volume that is populated with the contents of a git - repository. - - All required parameters must be populated in order to send to Azure. - - :param directory: Target directory name. Must not contain or start with - '..'. If '.' is supplied, the volume directory will be the git - repository. Otherwise, if specified, the volume will contain the git - repository in the subdirectory with the given name. - :type directory: str - :param repository: Required. Repository URL - :type repository: str - :param revision: Commit hash for the specified revision. - :type revision: str - """ - - _validation = { - 'repository': {'required': True}, - } - - _attribute_map = { - 'directory': {'key': 'directory', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'str'}, - } - - def __init__(self, *, repository: str, directory: str=None, revision: str=None, **kwargs) -> None: - super(GitRepoVolume, self).__init__(**kwargs) - self.directory = directory - self.repository = repository - self.revision = revision diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py deleted file mode 100644 index 6b9bf7d7bf06..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GpuResource(Model): - """The GPU resource. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. The count of the GPU resource. - :type count: int - :param sku: Required. The SKU of the GPU resource. Possible values - include: 'K80', 'P100', 'V100' - :type sku: str or ~azure.mgmt.containerinstance.models.GpuSku - """ - - _validation = { - 'count': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GpuResource, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py deleted file mode 100644 index c2b110219889..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GpuResource(Model): - """The GPU resource. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. The count of the GPU resource. - :type count: int - :param sku: Required. The SKU of the GPU resource. Possible values - include: 'K80', 'P100', 'V100' - :type sku: str or ~azure.mgmt.containerinstance.models.GpuSku - """ - - _validation = { - 'count': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, *, count: int, sku, **kwargs) -> None: - super(GpuResource, self).__init__(**kwargs) - self.count = count - self.sku = sku diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential.py deleted file mode 100644 index 62989fe9d793..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageRegistryCredential(Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :param server: Required. The Docker image registry server without a - protocol such as "http" and "https". - :type server: str - :param username: Required. The username for the private registry. - :type username: str - :param password: The password for the private registry. - :type password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential_py3.py deleted file mode 100644 index 6af83932e2e5..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/image_registry_credential_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageRegistryCredential(Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :param server: Required. The Docker image registry server without a - protocol such as "http" and "https". - :type server: str - :param username: Required. The username for the private registry. - :type username: str - :param password: The password for the private registry. - :type password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, *, server: str, username: str, password: str=None, **kwargs) -> None: - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = server - self.username = username - self.password = password diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py deleted file mode 100644 index e8a8be371071..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IpAddress(Model): - """IP address for the container group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param ports: Required. The list of ports exposed on the container group. - :type ports: list[~azure.mgmt.containerinstance.models.Port] - :param type: Required. Specifies if the IP is exposed to the public - internet or private VNET. Possible values include: 'Public', 'Private' - :type type: str or - ~azure.mgmt.containerinstance.models.ContainerGroupIpAddressType - :param ip: The IP exposed to the public internet. - :type ip: str - :param dns_name_label: The Dns name label for the IP. - :type dns_name_label: str - :ivar fqdn: The FQDN for the IP. - :vartype fqdn: str - """ - - _validation = { - 'ports': {'required': True}, - 'type': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'ports': {'key': 'ports', 'type': '[Port]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'ip': {'key': 'ip', 'type': 'str'}, - 'dns_name_label': {'key': 'dnsNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IpAddress, self).__init__(**kwargs) - self.ports = kwargs.get('ports', None) - self.type = kwargs.get('type', None) - self.ip = kwargs.get('ip', None) - self.dns_name_label = kwargs.get('dns_name_label', None) - self.fqdn = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py deleted file mode 100644 index cc21d6cedcc8..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IpAddress(Model): - """IP address for the container group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param ports: Required. The list of ports exposed on the container group. - :type ports: list[~azure.mgmt.containerinstance.models.Port] - :param type: Required. Specifies if the IP is exposed to the public - internet or private VNET. Possible values include: 'Public', 'Private' - :type type: str or - ~azure.mgmt.containerinstance.models.ContainerGroupIpAddressType - :param ip: The IP exposed to the public internet. - :type ip: str - :param dns_name_label: The Dns name label for the IP. - :type dns_name_label: str - :ivar fqdn: The FQDN for the IP. - :vartype fqdn: str - """ - - _validation = { - 'ports': {'required': True}, - 'type': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'ports': {'key': 'ports', 'type': '[Port]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'ip': {'key': 'ip', 'type': 'str'}, - 'dns_name_label': {'key': 'dnsNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, ports, type, ip: str=None, dns_name_label: str=None, **kwargs) -> None: - super(IpAddress, self).__init__(**kwargs) - self.ports = ports - self.type = type - self.ip = ip - self.dns_name_label = dns_name_label - self.fqdn = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py deleted file mode 100644 index b83202bc1dde..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalytics(Model): - """Container group log analytics information. - - All required parameters must be populated in order to send to Azure. - - :param workspace_id: Required. The workspace id for log analytics - :type workspace_id: str - :param workspace_key: Required. The workspace key for log analytics - :type workspace_key: str - :param log_type: The log type to be used. Possible values include: - 'ContainerInsights', 'ContainerInstanceLogs' - :type log_type: str or - ~azure.mgmt.containerinstance.models.LogAnalyticsLogType - :param metadata: Metadata for log analytics. - :type metadata: dict[str, str] - """ - - _validation = { - 'workspace_id': {'required': True}, - 'workspace_key': {'required': True}, - } - - _attribute_map = { - 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, - 'workspace_key': {'key': 'workspaceKey', 'type': 'str'}, - 'log_type': {'key': 'logType', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LogAnalytics, self).__init__(**kwargs) - self.workspace_id = kwargs.get('workspace_id', None) - self.workspace_key = kwargs.get('workspace_key', None) - self.log_type = kwargs.get('log_type', None) - self.metadata = kwargs.get('metadata', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py deleted file mode 100644 index c04a396961c3..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalytics(Model): - """Container group log analytics information. - - All required parameters must be populated in order to send to Azure. - - :param workspace_id: Required. The workspace id for log analytics - :type workspace_id: str - :param workspace_key: Required. The workspace key for log analytics - :type workspace_key: str - :param log_type: The log type to be used. Possible values include: - 'ContainerInsights', 'ContainerInstanceLogs' - :type log_type: str or - ~azure.mgmt.containerinstance.models.LogAnalyticsLogType - :param metadata: Metadata for log analytics. - :type metadata: dict[str, str] - """ - - _validation = { - 'workspace_id': {'required': True}, - 'workspace_key': {'required': True}, - } - - _attribute_map = { - 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, - 'workspace_key': {'key': 'workspaceKey', 'type': 'str'}, - 'log_type': {'key': 'logType', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': '{str}'}, - } - - def __init__(self, *, workspace_id: str, workspace_key: str, log_type=None, metadata=None, **kwargs) -> None: - super(LogAnalytics, self).__init__(**kwargs) - self.workspace_id = workspace_id - self.workspace_key = workspace_key - self.log_type = log_type - self.metadata = metadata diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs.py deleted file mode 100644 index 5d39e27a2a7d..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Logs(Model): - """The logs. - - :param content: The content of the log. - :type content: str - """ - - _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Logs, self).__init__(**kwargs) - self.content = kwargs.get('content', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs_py3.py deleted file mode 100644 index 02985d4324d7..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/logs_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Logs(Model): - """The logs. - - :param content: The content of the log. - :type content: str - """ - - _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, content: str=None, **kwargs) -> None: - super(Logs, self).__init__(**kwargs) - self.content = content diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation.py deleted file mode 100644 index 7954dc8cfc36..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """An operation for Azure Container Instance service. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the operation. - :type name: str - :param display: Required. The display information of the operation. - :type display: ~azure.mgmt.containerinstance.models.OperationDisplay - :param properties: The additional properties. - :type properties: object - :param origin: The intended executor of the operation. Possible values - include: 'User', 'System' - :type origin: str or - ~azure.mgmt.containerinstance.models.ContainerInstanceOperationsOrigin - """ - - _validation = { - 'name': {'required': True}, - 'display': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.properties = kwargs.get('properties', None) - self.origin = kwargs.get('origin', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display.py deleted file mode 100644 index 430c7517e8b1..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The display information of the operation. - - :param provider: The name of the provider of the operation. - :type provider: str - :param resource: The name of the resource type of the operation. - :type resource: str - :param operation: The friendly name of the operation. - :type operation: str - :param description: The description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display_py3.py deleted file mode 100644 index 7e7b32e54ecc..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The display information of the operation. - - :param provider: The name of the provider of the operation. - :type provider: str - :param resource: The name of the resource type of the operation. - :type resource: str - :param operation: The friendly name of the operation. - :type operation: str - :param description: The description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result.py deleted file mode 100644 index b2b84dd28e70..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationListResult(Model): - """The operation list response that contains all operations for Azure - Container Instance service. - - :param value: The list of operations. - :type value: list[~azure.mgmt.containerinstance.models.Operation] - :param next_link: The URI to fetch the next page of operations. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result_py3.py deleted file mode 100644 index 3a24331abe72..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationListResult(Model): - """The operation list response that contains all operations for Azure - Container Instance service. - - :param value: The list of operations. - :type value: list[~azure.mgmt.containerinstance.models.Operation] - :param next_link: The URI to fetch the next page of operations. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_py3.py deleted file mode 100644 index 85b72cc7e0c8..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """An operation for Azure Container Instance service. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the operation. - :type name: str - :param display: Required. The display information of the operation. - :type display: ~azure.mgmt.containerinstance.models.OperationDisplay - :param properties: The additional properties. - :type properties: object - :param origin: The intended executor of the operation. Possible values - include: 'User', 'System' - :type origin: str or - ~azure.mgmt.containerinstance.models.ContainerInstanceOperationsOrigin - """ - - _validation = { - 'name': {'required': True}, - 'display': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, *, name: str, display, properties=None, origin=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.properties = properties - self.origin = origin diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port.py deleted file mode 100644 index 5ac1a3993c24..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """The port exposed on the container group. - - All required parameters must be populated in order to send to Azure. - - :param protocol: The protocol associated with the port. Possible values - include: 'TCP', 'UDP' - :type protocol: str or - ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProtocol - :param port: Required. The port number. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Port, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.port = kwargs.get('port', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port_py3.py deleted file mode 100644 index f3885ce3ab0a..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/port_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """The port exposed on the container group. - - All required parameters must be populated in order to send to Azure. - - :param protocol: The protocol associated with the port. Possible values - include: 'TCP', 'UDP' - :type protocol: str or - ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProtocol - :param port: Required. The port number. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, *, port: int, protocol=None, **kwargs) -> None: - super(Port, self).__init__(**kwargs) - self.protocol = protocol - self.port = port diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource.py deleted file mode 100644 index ac9c1c8372a7..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py deleted file mode 100644 index d3f4972ff33c..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceLimits(Model): - """The resource limits. - - :param memory_in_gb: The memory limit in GB of this container instance. - :type memory_in_gb: float - :param cpu: The CPU limit of this container instance. - :type cpu: float - :param gpu: The GPU limit of this container instance. - :type gpu: ~azure.mgmt.containerinstance.models.GpuResource - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, - } - - def __init__(self, **kwargs): - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) - self.gpu = kwargs.get('gpu', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py deleted file mode 100644 index a702acaf33b4..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceLimits(Model): - """The resource limits. - - :param memory_in_gb: The memory limit in GB of this container instance. - :type memory_in_gb: float - :param cpu: The CPU limit of this container instance. - :type cpu: float - :param gpu: The GPU limit of this container instance. - :type gpu: ~azure.mgmt.containerinstance.models.GpuResource - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, - } - - def __init__(self, *, memory_in_gb: float=None, cpu: float=None, gpu=None, **kwargs) -> None: - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu - self.gpu = gpu diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_py3.py deleted file mode 100644 index 1a3b80c5355c..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py deleted file mode 100644 index 74817e729c42..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequests(Model): - """The resource requests. - - All required parameters must be populated in order to send to Azure. - - :param memory_in_gb: Required. The memory request in GB of this container - instance. - :type memory_in_gb: float - :param cpu: Required. The CPU request of this container instance. - :type cpu: float - :param gpu: The GPU request of this container instance. - :type gpu: ~azure.mgmt.containerinstance.models.GpuResource - """ - - _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, - } - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, - } - - def __init__(self, **kwargs): - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) - self.gpu = kwargs.get('gpu', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py deleted file mode 100644 index f4ab13f5efa8..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequests(Model): - """The resource requests. - - All required parameters must be populated in order to send to Azure. - - :param memory_in_gb: Required. The memory request in GB of this container - instance. - :type memory_in_gb: float - :param cpu: Required. The CPU request of this container instance. - :type cpu: float - :param gpu: The GPU request of this container instance. - :type gpu: ~azure.mgmt.containerinstance.models.GpuResource - """ - - _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, - } - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, - } - - def __init__(self, *, memory_in_gb: float, cpu: float, gpu=None, **kwargs) -> None: - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu - self.gpu = gpu diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements.py deleted file mode 100644 index db8de1b34121..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequirements(Model): - """The resource requirements. - - All required parameters must be populated in order to send to Azure. - - :param requests: Required. The resource requests of this container - instance. - :type requests: ~azure.mgmt.containerinstance.models.ResourceRequests - :param limits: The resource limits of this container instance. - :type limits: ~azure.mgmt.containerinstance.models.ResourceLimits - """ - - _validation = { - 'requests': {'required': True}, - } - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, - } - - def __init__(self, **kwargs): - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = kwargs.get('requests', None) - self.limits = kwargs.get('limits', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements_py3.py deleted file mode 100644 index 314c31c66b3b..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requirements_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequirements(Model): - """The resource requirements. - - All required parameters must be populated in order to send to Azure. - - :param requests: Required. The resource requests of this container - instance. - :type requests: ~azure.mgmt.containerinstance.models.ResourceRequests - :param limits: The resource limits of this container instance. - :type limits: ~azure.mgmt.containerinstance.models.ResourceLimits - """ - - _validation = { - 'requests': {'required': True}, - } - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, - } - - def __init__(self, *, requests, limits=None, **kwargs) -> None: - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = requests - self.limits = limits diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage.py deleted file mode 100644 index d86a21a03315..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """A single usage result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar unit: Unit of the usage result - :vartype unit: str - :ivar current_value: The current usage of the resource - :vartype current_value: int - :ivar limit: The maximum permitted usage of the resource. - :vartype limit: int - :ivar name: The name object of the resource - :vartype name: ~azure.mgmt.containerinstance.models.UsageName - """ - - _validation = { - 'unit': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.unit = None - self.current_value = None - self.limit = None - self.name = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result.py deleted file mode 100644 index 4948bfa503ee..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageListResult(Model): - """The response containing the usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: - :vartype value: list[~azure.mgmt.containerinstance.models.Usage] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - } - - def __init__(self, **kwargs): - super(UsageListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result_py3.py deleted file mode 100644 index ebecbf619150..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_list_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageListResult(Model): - """The response containing the usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: - :vartype value: list[~azure.mgmt.containerinstance.models.Usage] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - } - - def __init__(self, **kwargs) -> None: - super(UsageListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name.py deleted file mode 100644 index ab96bf2f6e2b..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The name object of the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the resource - :vartype value: str - :ivar localized_value: The localized name of the resource - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name_py3.py deleted file mode 100644 index 2318a2cf5201..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The name object of the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the resource - :vartype value: str - :ivar localized_value: The localized name of the resource - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_py3.py deleted file mode 100644 index 68b2abbf614f..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/usage_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """A single usage result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar unit: Unit of the usage result - :vartype unit: str - :ivar current_value: The current usage of the resource - :vartype current_value: int - :ivar limit: The maximum permitted usage of the resource. - :vartype limit: int - :ivar name: The name object of the resource - :vartype name: ~azure.mgmt.containerinstance.models.UsageName - """ - - _validation = { - 'unit': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__(self, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.unit = None - self.current_value = None - self.limit = None - self.name = None diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume.py deleted file mode 100644 index 0cb70af33ed4..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Volume(Model): - """The properties of the volume. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the volume. - :type name: str - :param azure_file: The Azure File volume. - :type azure_file: ~azure.mgmt.containerinstance.models.AzureFileVolume - :param empty_dir: The empty directory volume. - :type empty_dir: object - :param secret: The secret volume. - :type secret: dict[str, str] - :param git_repo: The git repo volume. - :type git_repo: ~azure.mgmt.containerinstance.models.GitRepoVolume - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'azure_file': {'key': 'azureFile', 'type': 'AzureFileVolume'}, - 'empty_dir': {'key': 'emptyDir', 'type': 'object'}, - 'secret': {'key': 'secret', 'type': '{str}'}, - 'git_repo': {'key': 'gitRepo', 'type': 'GitRepoVolume'}, - } - - def __init__(self, **kwargs): - super(Volume, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.azure_file = kwargs.get('azure_file', None) - self.empty_dir = kwargs.get('empty_dir', None) - self.secret = kwargs.get('secret', None) - self.git_repo = kwargs.get('git_repo', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount.py deleted file mode 100644 index 7e5ec91b98bf..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeMount(Model): - """The properties of the volume mount. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the volume mount. - :type name: str - :param mount_path: Required. The path within the container where the - volume should be mounted. Must not contain colon (:). - :type mount_path: str - :param read_only: The flag indicating whether the volume mount is - read-only. - :type read_only: bool - """ - - _validation = { - 'name': {'required': True}, - 'mount_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'mount_path': {'key': 'mountPath', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VolumeMount, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.mount_path = kwargs.get('mount_path', None) - self.read_only = kwargs.get('read_only', None) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount_py3.py deleted file mode 100644 index 9d4e7fdb1d05..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_mount_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeMount(Model): - """The properties of the volume mount. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the volume mount. - :type name: str - :param mount_path: Required. The path within the container where the - volume should be mounted. Must not contain colon (:). - :type mount_path: str - :param read_only: The flag indicating whether the volume mount is - read-only. - :type read_only: bool - """ - - _validation = { - 'name': {'required': True}, - 'mount_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'mount_path': {'key': 'mountPath', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - } - - def __init__(self, *, name: str, mount_path: str, read_only: bool=None, **kwargs) -> None: - super(VolumeMount, self).__init__(**kwargs) - self.name = name - self.mount_path = mount_path - self.read_only = read_only diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_py3.py deleted file mode 100644 index cc8eaa03353e..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/volume_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Volume(Model): - """The properties of the volume. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the volume. - :type name: str - :param azure_file: The Azure File volume. - :type azure_file: ~azure.mgmt.containerinstance.models.AzureFileVolume - :param empty_dir: The empty directory volume. - :type empty_dir: object - :param secret: The secret volume. - :type secret: dict[str, str] - :param git_repo: The git repo volume. - :type git_repo: ~azure.mgmt.containerinstance.models.GitRepoVolume - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'azure_file': {'key': 'azureFile', 'type': 'AzureFileVolume'}, - 'empty_dir': {'key': 'emptyDir', 'type': 'object'}, - 'secret': {'key': 'secret', 'type': '{str}'}, - 'git_repo': {'key': 'gitRepo', 'type': 'GitRepoVolume'}, - } - - def __init__(self, *, name: str, azure_file=None, empty_dir=None, secret=None, git_repo=None, **kwargs) -> None: - super(Volume, self).__init__(**kwargs) - self.name = name - self.azure_file = azure_file - self.empty_dir = empty_dir - self.secret = secret - self.git_repo = git_repo diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/__init__.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/__init__.py index 2ddda1c9f4a9..e5bbedd10e0a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/__init__.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/__init__.py @@ -9,16 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_groups_operations import ContainerGroupsOperations -from .operations import Operations -from .container_group_usage_operations import ContainerGroupUsageOperations -from .container_operations import ContainerOperations -from .service_association_link_operations import ServiceAssociationLinkOperations +from ._container_groups_operations import ContainerGroupsOperations +from ._operations import Operations +from ._location_operations import LocationOperations +from ._containers_operations import ContainersOperations __all__ = [ 'ContainerGroupsOperations', 'Operations', - 'ContainerGroupUsageOperations', - 'ContainerOperations', - 'ServiceAssociationLinkOperations', + 'LocationOperations', + 'ContainersOperations', ] diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py similarity index 92% rename from sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py rename to sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py index ca4c704ef993..9191fdfafd01 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py @@ -21,11 +21,13 @@ class ContainerGroupsOperations(object): """ContainerGroupsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-10-01". + :ivar api_version: Client API version. Constant value: "2019-12-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-10-01" + self.api_version = "2019-12-01" self.config = config @@ -58,8 +60,7 @@ def list( ~azure.mgmt.containerinstance.models.ContainerGroupPaged[~azure.mgmt.containerinstance.models.ContainerGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -88,6 +89,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -98,12 +104,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ContainerGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ContainerGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ContainerGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups'} @@ -130,8 +134,7 @@ def list_by_resource_group( ~azure.mgmt.containerinstance.models.ContainerGroupPaged[~azure.mgmt.containerinstance.models.ContainerGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -161,6 +164,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -171,12 +179,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ContainerGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ContainerGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ContainerGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups'} @@ -238,7 +244,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ContainerGroup', response) @@ -418,7 +423,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ContainerGroup', response) @@ -429,28 +433,9 @@ def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'} - def delete( - self, resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config): - """Delete the specified container group. - - Delete the specified container group in the specified subscription and - resource group. The operation does not delete other resources provided - by the user, such as volumes. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param container_group_name: The name of the container group. - :type container_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerinstance.models.ContainerGroup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -478,7 +463,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -493,6 +478,56 @@ def delete( return client_raw_response return deserialized + + def delete( + self, resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete the specified container group. + + Delete the specified container group in the specified subscription and + resource group. The operation does not delete other resources provided + by the user, such as volumes. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_group_name: The name of the container group. + :type container_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ContainerGroup or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerinstance.models.ContainerGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerinstance.models.ContainerGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + container_group_name=container_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ContainerGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'} @@ -675,7 +710,8 @@ def start( self, resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config): """Starts all containers in a container group. - Starts all containers in a container group. + Starts all containers in a container group. Compute resources will be + allocated and billing will start. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py similarity index 96% rename from sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py rename to sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py index 13b83c2053e6..c199810ef380 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py @@ -16,14 +16,16 @@ from .. import models -class ContainerOperations(object): - """ContainerOperations operations. +class ContainersOperations(object): + """ContainersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-10-01". + :ivar api_version: Client API version. Constant value: "2019-12-01". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-10-01" + self.api_version = "2019-12-01" self.config = config @@ -100,7 +102,6 @@ def list_logs( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Logs', response) @@ -179,7 +180,6 @@ def execute_command( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ContainerExecResponse', response) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py new file mode 100644 index 000000000000..f681e854da91 --- /dev/null +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py @@ -0,0 +1,252 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LocationOperations(object): + """LocationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2019-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-12-01" + + self.config = config + + def list_usage( + self, location, custom_headers=None, raw=False, **operation_config): + """Get the usage for a subscription. + + :param location: The identifier for the physical azure location. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.containerinstance.models.UsagePaged[~azure.mgmt.containerinstance.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usage.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usage.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages'} + + def list_cached_images( + self, location, custom_headers=None, raw=False, **operation_config): + """Get the list of cached images. + + Get the list of cached images on specific OS type for a subscription in + a region. + + :param location: The identifier for the physical azure location. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CachedImages + :rtype: + ~azure.mgmt.containerinstance.models.CachedImagesPaged[~azure.mgmt.containerinstance.models.CachedImages] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_cached_images.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CachedImagesPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_cached_images.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages'} + + def list_capabilities( + self, location, custom_headers=None, raw=False, **operation_config): + """Get the list of capabilities of the location. + + Get the list of CPU/memory/GPU capabilities of a region. + + :param location: The identifier for the physical azure location. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Capabilities + :rtype: + ~azure.mgmt.containerinstance.models.CapabilitiesPaged[~azure.mgmt.containerinstance.models.Capabilities] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_capabilities.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CapabilitiesPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities'} diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py new file mode 100644 index 000000000000..a1a35b8bf86a --- /dev/null +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2019-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List the operations for Azure Container Instance service. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.containerinstance.models.OperationPaged[~azure.mgmt.containerinstance.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ContainerInstance/operations'} diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py deleted file mode 100644 index eb2e67c1af7b..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ContainerGroupUsageOperations(object): - """ContainerGroupUsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Get the usage for a subscription. - - :param location: The identifier for the physical azure location. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UsageListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerinstance.models.UsageListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('UsageListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages'} diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py deleted file mode 100644 index 2b6806d3a7b7..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List the operations for Azure Container Instance service. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerinstance.models.OperationListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerInstance/operations'} diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/service_association_link_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/service_association_link_operations.py deleted file mode 100644 index 89c383a6eeb3..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/service_association_link_operations.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ServiceAssociationLinkOperations(object): - """ServiceAssociationLinkOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def delete( - self, resource_group_name, virtual_network_name, subnet_name, custom_headers=None, raw=False, **operation_config): - """Delete the container instance service association link for the subnet. - - Delete the container instance service association link for the subnet. - This operation unblocks user from deleting subnet. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default'} diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/setup.py b/sdk/containerinstance/azure-mgmt-containerinstance/setup.py index 290002de296c..fb7f0585a8f5 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/setup.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,