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 04614d28da01..a5b3107878cd 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 @@ -125,6 +125,7 @@ from .troubleshooting_details_py3 import TroubleshootingDetails from .troubleshooting_result_py3 import TroubleshootingResult from .retention_policy_parameters_py3 import RetentionPolicyParameters + from .traffic_analytics_configuration_properties_py3 import TrafficAnalyticsConfigurationProperties from .flow_log_status_parameters_py3 import FlowLogStatusParameters from .flow_log_information_py3 import FlowLogInformation from .connectivity_source_py3 import ConnectivitySource @@ -307,6 +308,7 @@ from .troubleshooting_details import TroubleshootingDetails from .troubleshooting_result import TroubleshootingResult from .retention_policy_parameters import RetentionPolicyParameters + from .traffic_analytics_configuration_properties import TrafficAnalyticsConfigurationProperties from .flow_log_status_parameters import FlowLogStatusParameters from .flow_log_information import FlowLogInformation from .connectivity_source import ConnectivitySource @@ -596,6 +598,7 @@ 'TroubleshootingDetails', 'TroubleshootingResult', 'RetentionPolicyParameters', + 'TrafficAnalyticsConfigurationProperties', 'FlowLogStatusParameters', 'FlowLogInformation', 'ConnectivitySource', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information.py index 5bd3cadf6287..5ed5055c3b7d 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information.py @@ -13,7 +13,8 @@ class FlowLogInformation(Model): - """Information on the configuration of flow log. + """Information on the configuration of flow log and traffic analytics + (optional). All required parameters must be populated in order to send to Azure. @@ -28,12 +29,16 @@ class FlowLogInformation(Model): :param retention_policy: :type retention_policy: ~azure.mgmt.network.v2018_01_01.models.RetentionPolicyParameters + :param network_watcher_flow_analytics_configuration: Required. + :type network_watcher_flow_analytics_configuration: + ~azure.mgmt.network.v2018_01_01.models.TrafficAnalyticsConfigurationProperties """ _validation = { 'target_resource_id': {'required': True}, 'storage_id': {'required': True}, 'enabled': {'required': True}, + 'network_watcher_flow_analytics_configuration': {'required': True}, } _attribute_map = { @@ -41,6 +46,7 @@ class FlowLogInformation(Model): 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'network_watcher_flow_analytics_configuration': {'key': 'flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration', 'type': 'TrafficAnalyticsConfigurationProperties'}, } def __init__(self, **kwargs): @@ -49,3 +55,4 @@ def __init__(self, **kwargs): self.storage_id = kwargs.get('storage_id', None) self.enabled = kwargs.get('enabled', None) self.retention_policy = kwargs.get('retention_policy', None) + self.network_watcher_flow_analytics_configuration = kwargs.get('network_watcher_flow_analytics_configuration', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information_py3.py index 6479279c749f..bec01d35bcc9 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_information_py3.py @@ -13,7 +13,8 @@ class FlowLogInformation(Model): - """Information on the configuration of flow log. + """Information on the configuration of flow log and traffic analytics + (optional). All required parameters must be populated in order to send to Azure. @@ -28,12 +29,16 @@ class FlowLogInformation(Model): :param retention_policy: :type retention_policy: ~azure.mgmt.network.v2018_01_01.models.RetentionPolicyParameters + :param network_watcher_flow_analytics_configuration: Required. + :type network_watcher_flow_analytics_configuration: + ~azure.mgmt.network.v2018_01_01.models.TrafficAnalyticsConfigurationProperties """ _validation = { 'target_resource_id': {'required': True}, 'storage_id': {'required': True}, 'enabled': {'required': True}, + 'network_watcher_flow_analytics_configuration': {'required': True}, } _attribute_map = { @@ -41,11 +46,13 @@ class FlowLogInformation(Model): 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'network_watcher_flow_analytics_configuration': {'key': 'flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration', 'type': 'TrafficAnalyticsConfigurationProperties'}, } - def __init__(self, *, target_resource_id: str, storage_id: str, enabled: bool, retention_policy=None, **kwargs) -> None: + def __init__(self, *, target_resource_id: str, storage_id: str, enabled: bool, network_watcher_flow_analytics_configuration, retention_policy=None, **kwargs) -> None: super(FlowLogInformation, self).__init__(**kwargs) self.target_resource_id = target_resource_id self.storage_id = storage_id self.enabled = enabled self.retention_policy = retention_policy + self.network_watcher_flow_analytics_configuration = network_watcher_flow_analytics_configuration diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters.py index 5a48e938f2d6..9848496b9fe6 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters.py @@ -13,12 +13,13 @@ class FlowLogStatusParameters(Model): - """Parameters that define a resource to query flow log status. + """Parameters that define a resource to query flow log and traffic analytics + (optional) status. All required parameters must be populated in order to send to Azure. :param target_resource_id: Required. The target resource where getting the - flow logging status. + flow logging and traffic analytics (optional) status. :type target_resource_id: str """ diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters_py3.py index 0768d2495150..9fbadc1113ea 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/flow_log_status_parameters_py3.py @@ -13,12 +13,13 @@ class FlowLogStatusParameters(Model): - """Parameters that define a resource to query flow log status. + """Parameters that define a resource to query flow log and traffic analytics + (optional) status. All required parameters must be populated in order to send to Azure. :param target_resource_id: Required. The target resource where getting the - flow logging status. + flow logging and traffic analytics (optional) status. :type target_resource_id: str """ diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/traffic_analytics_configuration_properties.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/traffic_analytics_configuration_properties.py new file mode 100644 index 000000000000..07ec840d9ed3 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/traffic_analytics_configuration_properties.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrafficAnalyticsConfigurationProperties(Model): + """Parameters that define the configuration of traffic analytics. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Flag to enable/disable traffic analytics. + :type enabled: bool + :param workspace_id: Required. The resource guid of the attached workspace + :type workspace_id: str + :param workspace_region: Required. The location of the attached workspace + :type workspace_region: str + :param workspace_resource_id: Required. Resource Id of the attached + workspace + :type workspace_resource_id: str + """ + + _validation = { + 'enabled': {'required': True}, + 'workspace_id': {'required': True}, + 'workspace_region': {'required': True}, + 'workspace_resource_id': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'workspace_region': {'key': 'workspaceRegion', 'type': 'str'}, + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrafficAnalyticsConfigurationProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.workspace_id = kwargs.get('workspace_id', None) + self.workspace_region = kwargs.get('workspace_region', None) + self.workspace_resource_id = kwargs.get('workspace_resource_id', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/traffic_analytics_configuration_properties_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/traffic_analytics_configuration_properties_py3.py new file mode 100644 index 000000000000..bbc5ad2372c3 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/traffic_analytics_configuration_properties_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TrafficAnalyticsConfigurationProperties(Model): + """Parameters that define the configuration of traffic analytics. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Flag to enable/disable traffic analytics. + :type enabled: bool + :param workspace_id: Required. The resource guid of the attached workspace + :type workspace_id: str + :param workspace_region: Required. The location of the attached workspace + :type workspace_region: str + :param workspace_resource_id: Required. Resource Id of the attached + workspace + :type workspace_resource_id: str + """ + + _validation = { + 'enabled': {'required': True}, + 'workspace_id': {'required': True}, + 'workspace_region': {'required': True}, + 'workspace_resource_id': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'workspace_region': {'key': 'workspaceRegion', 'type': 'str'}, + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool, workspace_id: str, workspace_region: str, workspace_resource_id: str, **kwargs) -> None: + super(TrafficAnalyticsConfigurationProperties, self).__init__(**kwargs) + self.enabled = enabled + self.workspace_id = workspace_id + self.workspace_region = workspace_region + self.workspace_resource_id = workspace_resource_id diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/network_watchers_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/network_watchers_operations.py index dec4aff44b4b..81db04e1082b 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/network_watchers_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/network_watchers_operations.py @@ -1103,7 +1103,8 @@ def _set_flow_log_configuration_initial( def set_flow_log_configuration( self, resource_group_name, network_watcher_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Configures flow log on a specified resource. + """Configures flow log and traffic analytics (optional) on a specified + resource. :param resource_group_name: The name of the network watcher resource group. @@ -1210,7 +1211,8 @@ def _get_flow_log_status_initial( def get_flow_log_status( self, resource_group_name, network_watcher_name, target_resource_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Queries status of flow log on a specified resource. + """Queries status of flow log and traffic analytics (optional) on a + specified resource. :param resource_group_name: The name of the network watcher resource group. @@ -1218,7 +1220,7 @@ def get_flow_log_status( :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param target_resource_id: The target resource where getting the flow - logging status. + logging and traffic analytics (optional) status. :type target_resource_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the