diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/__init__.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/__init__.py index 62ba4ca1bac9..04614d28da01 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/__init__.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/__init__.py @@ -23,6 +23,7 @@ from .service_endpoint_properties_format_py3 import ServiceEndpointPropertiesFormat from .public_ip_address_sku_py3 import PublicIPAddressSku from .public_ip_address_dns_settings_py3 import PublicIPAddressDnsSettings + from .ip_tag_py3 import IpTag from .public_ip_address_py3 import PublicIPAddress from .ip_configuration_py3 import IPConfiguration from .resource_navigation_link_py3 import ResourceNavigationLink @@ -142,6 +143,13 @@ from .available_providers_list_state_py3 import AvailableProvidersListState from .available_providers_list_country_py3 import AvailableProvidersListCountry from .available_providers_list_py3 import AvailableProvidersList + from .connection_monitor_source_py3 import ConnectionMonitorSource + from .connection_monitor_destination_py3 import ConnectionMonitorDestination + from .connection_monitor_parameters_py3 import ConnectionMonitorParameters + from .connection_monitor_py3 import ConnectionMonitor + from .connection_monitor_result_py3 import ConnectionMonitorResult + from .connection_state_snapshot_py3 import ConnectionStateSnapshot + from .connection_monitor_query_result_py3 import ConnectionMonitorQueryResult from .operation_display_py3 import OperationDisplay from .availability_py3 import Availability from .dimension_py3 import Dimension @@ -197,6 +205,7 @@ from .service_endpoint_properties_format import ServiceEndpointPropertiesFormat from .public_ip_address_sku import PublicIPAddressSku from .public_ip_address_dns_settings import PublicIPAddressDnsSettings + from .ip_tag import IpTag from .public_ip_address import PublicIPAddress from .ip_configuration import IPConfiguration from .resource_navigation_link import ResourceNavigationLink @@ -316,6 +325,13 @@ from .available_providers_list_state import AvailableProvidersListState from .available_providers_list_country import AvailableProvidersListCountry from .available_providers_list import AvailableProvidersList + from .connection_monitor_source import ConnectionMonitorSource + from .connection_monitor_destination import ConnectionMonitorDestination + from .connection_monitor_parameters import ConnectionMonitorParameters + from .connection_monitor import ConnectionMonitor + from .connection_monitor_result import ConnectionMonitorResult + from .connection_state_snapshot import ConnectionStateSnapshot + from .connection_monitor_query_result import ConnectionMonitorQueryResult from .operation_display import OperationDisplay from .availability import Availability from .dimension import Dimension @@ -377,6 +393,7 @@ from .security_rule_paged import SecurityRulePaged from .network_watcher_paged import NetworkWatcherPaged from .packet_capture_result_paged import PacketCaptureResultPaged +from .connection_monitor_result_paged import ConnectionMonitorResultPaged from .operation_paged import OperationPaged from .public_ip_address_paged import PublicIPAddressPaged from .route_filter_paged import RouteFilterPaged @@ -442,6 +459,8 @@ Severity, IssueType, ConnectionStatus, + ConnectionState, + EvaluationState, VirtualNetworkPeeringState, VirtualNetworkGatewayType, VpnType, @@ -475,6 +494,7 @@ 'ServiceEndpointPropertiesFormat', 'PublicIPAddressSku', 'PublicIPAddressDnsSettings', + 'IpTag', 'PublicIPAddress', 'IPConfiguration', 'ResourceNavigationLink', @@ -594,6 +614,13 @@ 'AvailableProvidersListState', 'AvailableProvidersListCountry', 'AvailableProvidersList', + 'ConnectionMonitorSource', + 'ConnectionMonitorDestination', + 'ConnectionMonitorParameters', + 'ConnectionMonitor', + 'ConnectionMonitorResult', + 'ConnectionStateSnapshot', + 'ConnectionMonitorQueryResult', 'OperationDisplay', 'Availability', 'Dimension', @@ -655,6 +682,7 @@ 'SecurityRulePaged', 'NetworkWatcherPaged', 'PacketCaptureResultPaged', + 'ConnectionMonitorResultPaged', 'OperationPaged', 'PublicIPAddressPaged', 'RouteFilterPaged', @@ -719,6 +747,8 @@ 'Severity', 'IssueType', 'ConnectionStatus', + 'ConnectionState', + 'EvaluationState', 'VirtualNetworkPeeringState', 'VirtualNetworkGatewayType', 'VpnType', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor.py new file mode 100644 index 000000000000..d1adc5502c60 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor.py @@ -0,0 +1,59 @@ +# 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 ConnectionMonitor(Model): + """Parameters that define the operation to create a connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param location: Connection monitor location. + :type location: str + :param tags: Connection monitor tags. + :type tags: dict[str, str] + :param source: Required. + :type source: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorSource + :param destination: Required. + :type destination: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start + automatically once created. Default value: True . + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + Default value: 60 . + :type monitoring_interval_in_seconds: int + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ConnectionMonitor, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.source = kwargs.get('source', None) + self.destination = kwargs.get('destination', None) + self.auto_start = kwargs.get('auto_start', True) + self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_destination.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_destination.py new file mode 100644 index 000000000000..9d1e3885cb38 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_destination.py @@ -0,0 +1,38 @@ +# 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 ConnectionMonitorDestination(Model): + """Describes the destination of connection monitor. + + :param resource_id: The ID of the resource used as the destination by + connection monitor. + :type resource_id: str + :param address: Address of the connection monitor destination (IP or + domain name). + :type address: str + :param port: The destination port used by connection monitor. + :type port: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ConnectionMonitorDestination, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.address = kwargs.get('address', None) + self.port = kwargs.get('port', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_destination_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_destination_py3.py new file mode 100644 index 000000000000..59e7465804ce --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_destination_py3.py @@ -0,0 +1,38 @@ +# 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 ConnectionMonitorDestination(Model): + """Describes the destination of connection monitor. + + :param resource_id: The ID of the resource used as the destination by + connection monitor. + :type resource_id: str + :param address: Address of the connection monitor destination (IP or + domain name). + :type address: str + :param port: The destination port used by connection monitor. + :type port: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, resource_id: str=None, address: str=None, port: int=None, **kwargs) -> None: + super(ConnectionMonitorDestination, self).__init__(**kwargs) + self.resource_id = resource_id + self.address = address + self.port = port diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters.py new file mode 100644 index 000000000000..feda29f52a4c --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters.py @@ -0,0 +1,51 @@ +# 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 ConnectionMonitorParameters(Model): + """Parameters that define the operation to create a connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorSource + :param destination: Required. + :type destination: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start + automatically once created. Default value: True . + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + Default value: 60 . + :type monitoring_interval_in_seconds: int + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ConnectionMonitorParameters, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.destination = kwargs.get('destination', None) + self.auto_start = kwargs.get('auto_start', True) + self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters_py3.py new file mode 100644 index 000000000000..b051de8dd6a5 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters_py3.py @@ -0,0 +1,51 @@ +# 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 ConnectionMonitorParameters(Model): + """Parameters that define the operation to create a connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorSource + :param destination: Required. + :type destination: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start + automatically once created. Default value: True . + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + Default value: 60 . + :type monitoring_interval_in_seconds: int + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, *, source, destination, auto_start: bool=True, monitoring_interval_in_seconds: int=60, **kwargs) -> None: + super(ConnectionMonitorParameters, self).__init__(**kwargs) + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_py3.py new file mode 100644 index 000000000000..6513df4822f6 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_py3.py @@ -0,0 +1,59 @@ +# 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 ConnectionMonitor(Model): + """Parameters that define the operation to create a connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param location: Connection monitor location. + :type location: str + :param tags: Connection monitor tags. + :type tags: dict[str, str] + :param source: Required. + :type source: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorSource + :param destination: Required. + :type destination: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start + automatically once created. Default value: True . + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + Default value: 60 . + :type monitoring_interval_in_seconds: int + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, *, source, destination, location: str=None, tags=None, auto_start: bool=True, monitoring_interval_in_seconds: int=60, **kwargs) -> None: + super(ConnectionMonitor, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_query_result.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_query_result.py new file mode 100644 index 000000000000..5b0b1e486946 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_query_result.py @@ -0,0 +1,29 @@ +# 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 ConnectionMonitorQueryResult(Model): + """List of connection states snaphots. + + :param states: Information about connection states. + :type states: + list[~azure.mgmt.network.v2018_01_01.models.ConnectionStateSnapshot] + """ + + _attribute_map = { + 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, + } + + def __init__(self, **kwargs): + super(ConnectionMonitorQueryResult, self).__init__(**kwargs) + self.states = kwargs.get('states', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_query_result_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_query_result_py3.py new file mode 100644 index 000000000000..bd37a5bab604 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_query_result_py3.py @@ -0,0 +1,29 @@ +# 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 ConnectionMonitorQueryResult(Model): + """List of connection states snaphots. + + :param states: Information about connection states. + :type states: + list[~azure.mgmt.network.v2018_01_01.models.ConnectionStateSnapshot] + """ + + _attribute_map = { + 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, + } + + def __init__(self, *, states=None, **kwargs) -> None: + super(ConnectionMonitorQueryResult, self).__init__(**kwargs) + self.states = states diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result.py new file mode 100644 index 000000000000..e86462442308 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result.py @@ -0,0 +1,98 @@ +# 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 ConnectionMonitorResult(Model): + """Information about the connection monitor. + + 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 name: Name of the connection monitor. + :vartype name: str + :ivar id: ID of the connection monitor. + :vartype id: str + :param etag: Default value: "A unique read-only string that changes + whenever the resource is updated." . + :type etag: str + :ivar type: Connection monitor type. + :vartype type: str + :param location: Connection monitor location. + :type location: str + :param tags: Connection monitor tags. + :type tags: dict[str, str] + :param source: Required. + :type source: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorSource + :param destination: Required. + :type destination: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start + automatically once created. Default value: True . + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + Default value: 60 . + :type monitoring_interval_in_seconds: int + :param provisioning_state: The provisioning state of the connection + monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', + 'Failed' + :type provisioning_state: str or + ~azure.mgmt.network.v2018_01_01.models.ProvisioningState + :param start_time: The date and time when the connection monitor was + started. + :type start_time: datetime + :param monitoring_status: The monitoring status of the connection monitor. + :type monitoring_status: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionMonitorResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = kwargs.get('etag', "A unique read-only string that changes whenever the resource is updated.") + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.source = kwargs.get('source', None) + self.destination = kwargs.get('destination', None) + self.auto_start = kwargs.get('auto_start', True) + self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.start_time = kwargs.get('start_time', None) + self.monitoring_status = kwargs.get('monitoring_status', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result_paged.py new file mode 100644 index 000000000000..27da8f0a2c74 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result_paged.py @@ -0,0 +1,27 @@ +# 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 ConnectionMonitorResultPaged(Paged): + """ + A paging container for iterating over a list of :class:`ConnectionMonitorResult ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConnectionMonitorResult]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectionMonitorResultPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result_py3.py new file mode 100644 index 000000000000..a63c14cdb35d --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_result_py3.py @@ -0,0 +1,98 @@ +# 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 ConnectionMonitorResult(Model): + """Information about the connection monitor. + + 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 name: Name of the connection monitor. + :vartype name: str + :ivar id: ID of the connection monitor. + :vartype id: str + :param etag: Default value: "A unique read-only string that changes + whenever the resource is updated." . + :type etag: str + :ivar type: Connection monitor type. + :vartype type: str + :param location: Connection monitor location. + :type location: str + :param tags: Connection monitor tags. + :type tags: dict[str, str] + :param source: Required. + :type source: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorSource + :param destination: Required. + :type destination: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start + automatically once created. Default value: True . + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + Default value: 60 . + :type monitoring_interval_in_seconds: int + :param provisioning_state: The provisioning state of the connection + monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', + 'Failed' + :type provisioning_state: str or + ~azure.mgmt.network.v2018_01_01.models.ProvisioningState + :param start_time: The date and time when the connection monitor was + started. + :type start_time: datetime + :param monitoring_status: The monitoring status of the connection monitor. + :type monitoring_status: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + } + + def __init__(self, *, source, destination, etag: str="A unique read-only string that changes whenever the resource is updated.", location: str=None, tags=None, auto_start: bool=True, monitoring_interval_in_seconds: int=60, provisioning_state=None, start_time=None, monitoring_status: str=None, **kwargs) -> None: + super(ConnectionMonitorResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = etag + self.type = None + self.location = location + self.tags = tags + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds + self.provisioning_state = provisioning_state + self.start_time = start_time + self.monitoring_status = monitoring_status diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_source.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_source.py new file mode 100644 index 000000000000..1425fa613ce5 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_source.py @@ -0,0 +1,39 @@ +# 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 ConnectionMonitorSource(Model): + """Describes the source of connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The ID of the resource used as the source by + connection monitor. + :type resource_id: str + :param port: The source port used by connection monitor. + :type port: int + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ConnectionMonitorSource, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.port = kwargs.get('port', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_source_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_source_py3.py new file mode 100644 index 000000000000..4d44fcaf8bf0 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_source_py3.py @@ -0,0 +1,39 @@ +# 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 ConnectionMonitorSource(Model): + """Describes the source of connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The ID of the resource used as the source by + connection monitor. + :type resource_id: str + :param port: The source port used by connection monitor. + :type port: int + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, resource_id: str, port: int=None, **kwargs) -> None: + super(ConnectionMonitorSource, self).__init__(**kwargs) + self.resource_id = resource_id + self.port = port diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_state_snapshot.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_state_snapshot.py new file mode 100644 index 000000000000..1d6d52026d98 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_state_snapshot.py @@ -0,0 +1,56 @@ +# 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 ConnectionStateSnapshot(Model): + """Connection state snapshot. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param connection_state: The connection state. Possible values include: + 'Reachable', 'Unreachable', 'Unknown' + :type connection_state: str or + ~azure.mgmt.network.v2018_01_01.models.ConnectionState + :param start_time: The start time of the connection snapshot. + :type start_time: datetime + :param end_time: The end time of the connection snapshot. + :type end_time: datetime + :param evaluation_state: Connectivity analysis evaluation state. Possible + values include: 'NotStarted', 'InProgress', 'Completed' + :type evaluation_state: str or + ~azure.mgmt.network.v2018_01_01.models.EvaluationState + :ivar hops: List of hops between the source and the destination. + :vartype hops: + list[~azure.mgmt.network.v2018_01_01.models.ConnectivityHop] + """ + + _validation = { + 'hops': {'readonly': True}, + } + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'evaluation_state': {'key': 'evaluationState', 'type': 'str'}, + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + } + + def __init__(self, **kwargs): + super(ConnectionStateSnapshot, self).__init__(**kwargs) + self.connection_state = kwargs.get('connection_state', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.evaluation_state = kwargs.get('evaluation_state', None) + self.hops = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_state_snapshot_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_state_snapshot_py3.py new file mode 100644 index 000000000000..9b878b066117 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_state_snapshot_py3.py @@ -0,0 +1,56 @@ +# 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 ConnectionStateSnapshot(Model): + """Connection state snapshot. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param connection_state: The connection state. Possible values include: + 'Reachable', 'Unreachable', 'Unknown' + :type connection_state: str or + ~azure.mgmt.network.v2018_01_01.models.ConnectionState + :param start_time: The start time of the connection snapshot. + :type start_time: datetime + :param end_time: The end time of the connection snapshot. + :type end_time: datetime + :param evaluation_state: Connectivity analysis evaluation state. Possible + values include: 'NotStarted', 'InProgress', 'Completed' + :type evaluation_state: str or + ~azure.mgmt.network.v2018_01_01.models.EvaluationState + :ivar hops: List of hops between the source and the destination. + :vartype hops: + list[~azure.mgmt.network.v2018_01_01.models.ConnectivityHop] + """ + + _validation = { + 'hops': {'readonly': True}, + } + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'evaluation_state': {'key': 'evaluationState', 'type': 'str'}, + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + } + + def __init__(self, *, connection_state=None, start_time=None, end_time=None, evaluation_state=None, **kwargs) -> None: + super(ConnectionStateSnapshot, self).__init__(**kwargs) + self.connection_state = connection_state + self.start_time = start_time + self.end_time = end_time + self.evaluation_state = evaluation_state + self.hops = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool.py index 142a87efc92a..a9e3f8c32c33 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool.py @@ -38,6 +38,16 @@ class InboundNatPool(SubResource): :param backend_port: Required. The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. + The value can be set between 4 and 30 minutes. The default value is 4 + minutes. This element is only used when the protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the + floating IP capability required to configure a SQL AlwaysOn Availability + Group. This setting is required when using the SQL AlwaysOn Availability + Groups in SQL server. This setting can't be changed after you create the + endpoint. + :type enable_floating_ip: bool :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. :type provisioning_state: str @@ -63,6 +73,8 @@ class InboundNatPool(SubResource): 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, @@ -75,6 +87,8 @@ def __init__(self, **kwargs): self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) self.backend_port = kwargs.get('backend_port', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.enable_floating_ip = kwargs.get('enable_floating_ip', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.name = kwargs.get('name', None) self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool_py3.py index a5471a5c9a72..14dfb221ab1a 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_pool_py3.py @@ -38,6 +38,16 @@ class InboundNatPool(SubResource): :param backend_port: Required. The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. + The value can be set between 4 and 30 minutes. The default value is 4 + minutes. This element is only used when the protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the + floating IP capability required to configure a SQL AlwaysOn Availability + Group. This setting is required when using the SQL AlwaysOn Availability + Groups in SQL server. This setting can't be changed after you create the + endpoint. + :type enable_floating_ip: bool :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. :type provisioning_state: str @@ -63,18 +73,22 @@ class InboundNatPool(SubResource): 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, protocol, frontend_port_range_start: int, frontend_port_range_end: int, backend_port: int, id: str=None, frontend_ip_configuration=None, provisioning_state: str=None, name: str=None, etag: str=None, **kwargs) -> None: + def __init__(self, *, protocol, frontend_port_range_start: int, frontend_port_range_end: int, backend_port: int, id: str=None, frontend_ip_configuration=None, idle_timeout_in_minutes: int=None, enable_floating_ip: bool=None, provisioning_state: str=None, name: str=None, etag: str=None, **kwargs) -> None: super(InboundNatPool, self).__init__(id=id, **kwargs) self.frontend_ip_configuration = frontend_ip_configuration self.protocol = protocol self.frontend_port_range_start = frontend_port_range_start self.frontend_port_range_end = frontend_port_range_end self.backend_port = backend_port + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_floating_ip = enable_floating_ip self.provisioning_state = provisioning_state self.name = name self.etag = etag diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/ip_tag.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/ip_tag.py new file mode 100644 index 000000000000..b8690371226d --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/ip_tag.py @@ -0,0 +1,33 @@ +# 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 IpTag(Model): + """Contains the IpTag associated with the public IP address. + + :param ip_tag_type: Gets or sets the ipTag type: Example FirstPartyUsage. + :type ip_tag_type: str + :param tag: Gets or sets value of the IpTag associated with the public IP. + Example SQL, Storage etc + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs.get('ip_tag_type', None) + self.tag = kwargs.get('tag', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/ip_tag_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/ip_tag_py3.py new file mode 100644 index 000000000000..fbb5338ff30e --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/ip_tag_py3.py @@ -0,0 +1,33 @@ +# 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 IpTag(Model): + """Contains the IpTag associated with the public IP address. + + :param ip_tag_type: Gets or sets the ipTag type: Example FirstPartyUsage. + :type ip_tag_type: str + :param tag: Gets or sets value of the IpTag associated with the public IP. + Example SQL, Storage etc + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: + super(IpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_management_client_enums.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_management_client_enums.py index 973e75fb5ce8..80779ff26b9f 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_management_client_enums.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_management_client_enums.py @@ -373,6 +373,20 @@ class ConnectionStatus(str, Enum): degraded = "Degraded" +class ConnectionState(str, Enum): + + reachable = "Reachable" + unreachable = "Unreachable" + unknown = "Unknown" + + +class EvaluationState(str, Enum): + + not_started = "NotStarted" + in_progress = "InProgress" + completed = "Completed" + + class VirtualNetworkPeeringState(str, Enum): initiated = "Initiated" diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher.py index 7befee24dacc..9b99b5be2a9a 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher.py @@ -28,8 +28,8 @@ class NetworkWatcher(Resource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource - is updated. + :param etag: Default value: "A unique read-only string that changes + whenever the resource is updated." . :type etag: str :ivar provisioning_state: The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -55,5 +55,5 @@ class NetworkWatcher(Resource): def __init__(self, **kwargs): super(NetworkWatcher, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) + self.etag = kwargs.get('etag', "A unique read-only string that changes whenever the resource is updated.") self.provisioning_state = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher_py3.py index 11f3f1027270..440bd0d07b48 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_watcher_py3.py @@ -28,8 +28,8 @@ class NetworkWatcher(Resource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource - is updated. + :param etag: Default value: "A unique read-only string that changes + whenever the resource is updated." . :type etag: str :ivar provisioning_state: The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -53,7 +53,7 @@ class NetworkWatcher(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, id: str=None, location: str=None, tags=None, etag: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, location: str=None, tags=None, etag: str="A unique read-only string that changes whenever the resource is updated.", **kwargs) -> None: super(NetworkWatcher, self).__init__(id=id, location=location, tags=tags, **kwargs) self.etag = etag self.provisioning_state = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture.py index 367551b53b24..d42b41a53f22 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture.py @@ -15,8 +15,17 @@ class PacketCapture(Model): """Parameters that define the create packet capture operation. + 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 name: Name of the packet capture. + :vartype name: str + :ivar id: ID of the packet capture. + :vartype id: str + :ivar type: Packet capture type. + :vartype type: str :param target: Required. The ID of the targeted resource, only VM is currently supported. :type target: str @@ -38,11 +47,17 @@ class PacketCapture(Model): """ _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, 'target': {'required': True}, 'storage_location': {'required': True}, } _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'target': {'key': 'properties.target', 'type': 'str'}, 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, @@ -53,6 +68,9 @@ class PacketCapture(Model): def __init__(self, **kwargs): super(PacketCapture, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None self.target = kwargs.get('target', None) self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_py3.py index 2aca6787236c..2b7b92dfcdb9 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_py3.py @@ -15,8 +15,17 @@ class PacketCapture(Model): """Parameters that define the create packet capture operation. + 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 name: Name of the packet capture. + :vartype name: str + :ivar id: ID of the packet capture. + :vartype id: str + :ivar type: Packet capture type. + :vartype type: str :param target: Required. The ID of the targeted resource, only VM is currently supported. :type target: str @@ -38,11 +47,17 @@ class PacketCapture(Model): """ _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, 'target': {'required': True}, 'storage_location': {'required': True}, } _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'target': {'key': 'properties.target', 'type': 'str'}, 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, @@ -53,6 +68,9 @@ class PacketCapture(Model): def __init__(self, *, target: str, storage_location, bytes_to_capture_per_packet: int=0, total_bytes_per_session: int=1073741824, time_limit_in_seconds: int=18000, filters=None, **kwargs) -> None: super(PacketCapture, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None self.target = target self.bytes_to_capture_per_packet = bytes_to_capture_per_packet self.total_bytes_per_session = total_bytes_per_session diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result.py index 753b10d3d24e..63afeadcc410 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result.py @@ -20,10 +20,12 @@ class PacketCaptureResult(Model): All required parameters must be populated in order to send to Azure. - :ivar name: Name of the packet capture session. + :ivar name: Name of the packet capture. :vartype name: str - :ivar id: ID of the packet capture operation. + :ivar id: ID of the packet capture. :vartype id: str + :ivar type: Packet capture type. + :vartype type: str :param etag: Default value: "A unique read-only string that changes whenever the resource is updated." . :type etag: str @@ -55,6 +57,7 @@ class PacketCaptureResult(Model): _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, + 'type': {'readonly': True}, 'target': {'required': True}, 'storage_location': {'required': True}, } @@ -62,6 +65,7 @@ class PacketCaptureResult(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'target': {'key': 'properties.target', 'type': 'str'}, 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, @@ -76,6 +80,7 @@ def __init__(self, **kwargs): super(PacketCaptureResult, self).__init__(**kwargs) self.name = None self.id = None + self.type = None self.etag = kwargs.get('etag', "A unique read-only string that changes whenever the resource is updated.") self.target = kwargs.get('target', None) self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result_py3.py index 2c6da31f8126..707c3278fe8d 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/packet_capture_result_py3.py @@ -20,10 +20,12 @@ class PacketCaptureResult(Model): All required parameters must be populated in order to send to Azure. - :ivar name: Name of the packet capture session. + :ivar name: Name of the packet capture. :vartype name: str - :ivar id: ID of the packet capture operation. + :ivar id: ID of the packet capture. :vartype id: str + :ivar type: Packet capture type. + :vartype type: str :param etag: Default value: "A unique read-only string that changes whenever the resource is updated." . :type etag: str @@ -55,6 +57,7 @@ class PacketCaptureResult(Model): _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, + 'type': {'readonly': True}, 'target': {'required': True}, 'storage_location': {'required': True}, } @@ -62,6 +65,7 @@ class PacketCaptureResult(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'target': {'key': 'properties.target', 'type': 'str'}, 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, @@ -76,6 +80,7 @@ def __init__(self, *, target: str, storage_location, etag: str="A unique read-on super(PacketCaptureResult, self).__init__(**kwargs) self.name = None self.id = None + self.type = None self.etag = etag self.target = target self.bytes_to_capture_per_packet = bytes_to_capture_per_packet diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule.py index f406cdb4f2ac..be8e77d64a13 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule.py @@ -40,8 +40,6 @@ class PatchRouteFilterRule(SubResource): :ivar etag: A unique read-only string that changes whenever the resource is updated. :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] """ _validation = { @@ -61,7 +59,6 @@ class PatchRouteFilterRule(SubResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } route_filter_rule_type = "Community" @@ -73,4 +70,3 @@ def __init__(self, **kwargs): self.provisioning_state = None self.name = None self.etag = None - self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule_py3.py index 5bc3c6179a74..cf209e812bc9 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/patch_route_filter_rule_py3.py @@ -40,8 +40,6 @@ class PatchRouteFilterRule(SubResource): :ivar etag: A unique read-only string that changes whenever the resource is updated. :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] """ _validation = { @@ -61,16 +59,14 @@ class PatchRouteFilterRule(SubResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } route_filter_rule_type = "Community" - def __init__(self, *, access, communities, id: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, access, communities, id: str=None, **kwargs) -> None: super(PatchRouteFilterRule, self).__init__(id=id, **kwargs) self.access = access self.communities = communities self.provisioning_state = None self.name = None self.etag = None - self.tags = tags diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address.py index f0c50c10f424..093b16e77a2d 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address.py @@ -47,6 +47,8 @@ class PublicIPAddress(Resource): IP address. :type dns_settings: ~azure.mgmt.network.v2018_01_01.models.PublicIPAddressDnsSettings + :param ip_tags: The list of tags associated with the public IP address. + :type ip_tags: list[~azure.mgmt.network.v2018_01_01.models.IpTag] :param ip_address: The IP address associated with the public IP address resource. :type ip_address: str @@ -83,6 +85,7 @@ class PublicIPAddress(Resource): 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, @@ -98,6 +101,7 @@ def __init__(self, **kwargs): self.public_ip_address_version = kwargs.get('public_ip_address_version', None) self.ip_configuration = None self.dns_settings = kwargs.get('dns_settings', None) + self.ip_tags = kwargs.get('ip_tags', None) self.ip_address = kwargs.get('ip_address', None) self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) self.resource_guid = kwargs.get('resource_guid', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address_py3.py index f10fbbfa30c1..e5f405e95c62 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/public_ip_address_py3.py @@ -47,6 +47,8 @@ class PublicIPAddress(Resource): IP address. :type dns_settings: ~azure.mgmt.network.v2018_01_01.models.PublicIPAddressDnsSettings + :param ip_tags: The list of tags associated with the public IP address. + :type ip_tags: list[~azure.mgmt.network.v2018_01_01.models.IpTag] :param ip_address: The IP address associated with the public IP address resource. :type ip_address: str @@ -83,6 +85,7 @@ class PublicIPAddress(Resource): 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, @@ -91,13 +94,14 @@ class PublicIPAddress(Resource): 'zones': {'key': 'zones', 'type': '[str]'}, } - def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, public_ip_allocation_method=None, public_ip_address_version=None, dns_settings=None, ip_address: str=None, idle_timeout_in_minutes: int=None, resource_guid: str=None, provisioning_state: str=None, etag: str=None, zones=None, **kwargs) -> None: + def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, public_ip_allocation_method=None, public_ip_address_version=None, dns_settings=None, ip_tags=None, ip_address: str=None, idle_timeout_in_minutes: int=None, resource_guid: str=None, provisioning_state: str=None, etag: str=None, zones=None, **kwargs) -> None: super(PublicIPAddress, self).__init__(id=id, location=location, tags=tags, **kwargs) self.sku = sku self.public_ip_allocation_method = public_ip_allocation_method self.public_ip_address_version = public_ip_address_version self.ip_configuration = None self.dns_settings = dns_settings + self.ip_tags = ip_tags self.ip_address = ip_address self.idle_timeout_in_minutes = idle_timeout_in_minutes self.resource_guid = resource_guid diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule.py index af501c1f8946..426d0090a277 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule.py @@ -42,8 +42,6 @@ class RouteFilterRule(SubResource): :ivar etag: A unique read-only string that changes whenever the resource is updated. :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] """ _validation = { @@ -63,7 +61,6 @@ class RouteFilterRule(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } route_filter_rule_type = "Community" @@ -76,4 +73,3 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.location = kwargs.get('location', None) self.etag = None - self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule_py3.py index d79ead603c29..70ec4c60e71b 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/route_filter_rule_py3.py @@ -42,8 +42,6 @@ class RouteFilterRule(SubResource): :ivar etag: A unique read-only string that changes whenever the resource is updated. :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] """ _validation = { @@ -63,12 +61,11 @@ class RouteFilterRule(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } route_filter_rule_type = "Community" - def __init__(self, *, access, communities, id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, access, communities, id: str=None, name: str=None, location: str=None, **kwargs) -> None: super(RouteFilterRule, self).__init__(id=id, **kwargs) self.access = access self.communities = communities @@ -76,4 +73,3 @@ def __init__(self, *, access, communities, id: str=None, name: str=None, locatio self.name = name self.location = location self.etag = None - self.tags = tags diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/network_management_client.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/network_management_client.py index 04c313611c7f..398496371570 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/network_management_client.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/network_management_client.py @@ -40,6 +40,7 @@ from .operations.default_security_rules_operations import DefaultSecurityRulesOperations from .operations.network_watchers_operations import NetworkWatchersOperations from .operations.packet_captures_operations import PacketCapturesOperations +from .operations.connection_monitors_operations import ConnectionMonitorsOperations from .operations.operations import Operations from .operations.public_ip_addresses_operations import PublicIPAddressesOperations from .operations.route_filters_operations import RouteFiltersOperations @@ -141,6 +142,8 @@ class NetworkManagementClient(object): :vartype network_watchers: azure.mgmt.network.v2018_01_01.operations.NetworkWatchersOperations :ivar packet_captures: PacketCaptures operations :vartype packet_captures: azure.mgmt.network.v2018_01_01.operations.PacketCapturesOperations + :ivar connection_monitors: ConnectionMonitors operations + :vartype connection_monitors: azure.mgmt.network.v2018_01_01.operations.ConnectionMonitorsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.network.v2018_01_01.operations.Operations :ivar public_ip_addresses: PublicIPAddresses operations @@ -234,6 +237,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.packet_captures = PacketCapturesOperations( self._client, self.config, self._serialize, self._deserialize) + self.connection_monitors = ConnectionMonitorsOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.public_ip_addresses = PublicIPAddressesOperations( diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/__init__.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/__init__.py index 7f37d404c590..eeaf47139863 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/__init__.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/__init__.py @@ -31,6 +31,7 @@ from .default_security_rules_operations import DefaultSecurityRulesOperations from .network_watchers_operations import NetworkWatchersOperations from .packet_captures_operations import PacketCapturesOperations +from .connection_monitors_operations import ConnectionMonitorsOperations from .operations import Operations from .public_ip_addresses_operations import PublicIPAddressesOperations from .route_filters_operations import RouteFiltersOperations @@ -69,6 +70,7 @@ 'DefaultSecurityRulesOperations', 'NetworkWatchersOperations', 'PacketCapturesOperations', + 'ConnectionMonitorsOperations', 'Operations', 'PublicIPAddressesOperations', 'RouteFiltersOperations', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/connection_monitors_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/connection_monitors_operations.py new file mode 100644 index 000000000000..23e2e45c7497 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/connection_monitors_operations.py @@ -0,0 +1,644 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ConnectionMonitorsOperations(object): + """ConnectionMonitorsOperations 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-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'ConnectionMonitor') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + 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('ConnectionMonitorResult', response) + if response.status_code == 201: + deserialized = self._deserialize('ConnectionMonitorResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a connection monitor. + + :param resource_group_name: The name of the resource group containing + Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :param parameters: Parameters that define the operation to create a + connection monitor. + :type parameters: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitor + :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 ConnectionMonitorResult + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorResult]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConnectionMonitorResult', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'} + + def get( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, **operation_config): + """Gets a connection monitor by name. + + :param resource_group_name: The name of the resource group containing + Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_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: ConnectionMonitorResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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['Content-Type'] = 'application/json; charset=utf-8' + 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) + response = self._client.send(request, header_parameters, 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('ConnectionMonitorResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'} + + + def _delete_initial( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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['Content-Type'] = 'application/json; charset=utf-8' + 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) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [202, 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 + + def delete( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified connection monitor. + + :param resource_group_name: The name of the resource group containing + Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'} + + + def _stop_initial( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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['Content-Type'] = 'application/json; charset=utf-8' + 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.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + 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 + + def stop( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Stops the specified connection monitor. + + :param resource_group_name: The name of the resource group containing + Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop'} + + + def _start_initial( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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['Content-Type'] = 'application/json; charset=utf-8' + 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.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + 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 + + def start( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts the specified connection monitor. + + :param resource_group_name: The name of the resource group containing + Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start'} + + + def _query_initial( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.query.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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['Content-Type'] = 'application/json; charset=utf-8' + 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.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + 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('ConnectionMonitorQueryResult', response) + if response.status_code == 202: + deserialized = self._deserialize('ConnectionMonitorQueryResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def query( + self, resource_group_name, network_watcher_name, connection_monitor_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Query a snapshot of the most recent connection states. + + :param resource_group_name: The name of the resource group containing + Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name given to the connection + monitor. + :type connection_monitor_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 + ConnectionMonitorQueryResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorQueryResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorQueryResult]] + :raises: :class:`CloudError` + """ + raw_result = self._query_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConnectionMonitorQueryResult', 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) + query.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query'} + + def list( + self, resource_group_name, network_watcher_name, custom_headers=None, raw=False, **operation_config): + """Lists all connection monitors for the specified Network Watcher. + + :param resource_group_name: The name of the resource group containing + Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_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: An iterator like instance of ConnectionMonitorResult + :rtype: + ~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorResultPaged[~azure.mgmt.network.v2018_01_01.models.ConnectionMonitorResult] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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['Content-Type'] = 'application/json; charset=utf-8' + 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) + response = self._client.send( + request, header_parameters, 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 + deserialized = models.ConnectionMonitorResultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConnectionMonitorResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors'}