diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py index a969d13ac371..5c9d34847435 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py @@ -86,7 +86,7 @@ def __init__( 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-06-01' + self.api_version = '2018-09-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py index 1ba2cf55de82..9941b6900203 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py @@ -32,6 +32,7 @@ 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 .container_group_py3 import ContainerGroup from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation @@ -67,6 +68,7 @@ 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 .container_group import ContainerGroup from .operation_display import OperationDisplay from .operation import Operation @@ -85,6 +87,7 @@ ContainerGroupRestartPolicy, ContainerGroupNetworkProtocol, OperatingSystemTypes, + LogAnalyticsLogType, ContainerInstanceOperationsOrigin, ) @@ -111,6 +114,7 @@ 'ContainerGroupPropertiesInstanceView', 'LogAnalytics', 'ContainerGroupDiagnostics', + 'ContainerGroupNetworkProfile', 'ContainerGroup', 'OperationDisplay', 'Operation', @@ -128,5 +132,6 @@ 'ContainerGroupRestartPolicy', 'ContainerGroupNetworkProtocol', 'OperatingSystemTypes', + 'LogAnalyticsLogType', 'ContainerInstanceOperationsOrigin', ] diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py index fa4a94d911e0..47260a4a39ac 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py @@ -64,6 +64,10 @@ class ContainerGroup(Resource): :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 """ _validation = { @@ -91,6 +95,7 @@ class ContainerGroup(Resource): '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'}, } def __init__(self, **kwargs): @@ -104,3 +109,4 @@ def __init__(self, **kwargs): self.volumes = kwargs.get('volumes', None) self.instance_view = None self.diagnostics = kwargs.get('diagnostics', None) + self.network_profile = kwargs.get('network_profile', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py new file mode 100644 index 000000000000..026387cb17a8 --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py @@ -0,0 +1,34 @@ +# 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/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py new file mode 100644 index 000000000000..72e54d274eec --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py @@ -0,0 +1,34 @@ +# 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/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py index da93f1668143..c50598dbd643 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py @@ -64,6 +64,10 @@ class ContainerGroup(Resource): :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 """ _validation = { @@ -91,9 +95,10 @@ class ContainerGroup(Resource): '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'}, } - def __init__(self, *, containers, os_type, location: str=None, tags=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, **kwargs) -> None: + def __init__(self, *, containers, os_type, location: str=None, tags=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, **kwargs) -> None: super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs) self.provisioning_state = None self.containers = containers @@ -104,3 +109,4 @@ def __init__(self, *, containers, os_type, location: str=None, tags=None, image_ self.volumes = volumes self.instance_view = None self.diagnostics = diagnostics + self.network_profile = network_profile diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py index 04280f098e01..a987c8076d04 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py @@ -37,6 +37,12 @@ class OperatingSystemTypes(str, Enum): linux = "Linux" +class LogAnalyticsLogType(str, Enum): + + container_insights = "ContainerInsights" + container_instance_logs = "ContainerInstanceLogs" + + class ContainerInstanceOperationsOrigin(str, Enum): user = "User" diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py index 7179478dda9d..b83202bc1dde 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py @@ -21,6 +21,12 @@ class LogAnalytics(Model): :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 = { @@ -31,9 +37,13 @@ class LogAnalytics(Model): _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/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py index a628d09e0d45..c04a396961c3 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py @@ -21,6 +21,12 @@ class LogAnalytics(Model): :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 = { @@ -31,9 +37,13 @@ class LogAnalytics(Model): _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, **kwargs) -> None: + 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/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py index 4da58557ee45..faa702e28f5a 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py @@ -23,7 +23,7 @@ class ContainerGroupUsageOperations(object): :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-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py index 0c8da2e1a2ef..5e42762bc234 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py @@ -25,7 +25,7 @@ class ContainerGroupsOperations(object): :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-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config @@ -537,7 +537,7 @@ def restart( self, resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config): """Restarts all containers in a container group. - Restarts all containers in a contaienr group in place. If container + Restarts all containers in a container group in place. If container image has updates, new image will be downloaded. :param resource_group_name: The name of the resource group. @@ -581,7 +581,7 @@ def stop( self, resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config): """Stops all containers in a container group. - Stops all containers in a contaienr group. Compute resources will be + Stops all containers in a container group. Compute resources will be deallocated and billing will stop. :param resource_group_name: The name of the resource group. diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py index 87ca1849c3aa..67df85731647 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py @@ -23,7 +23,7 @@ class ContainerOperations(object): :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-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py index 0e14f89fdaf5..d80cbac84d72 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :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-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config