Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -596,6 +598,7 @@
'TroubleshootingDetails',
'TroubleshootingResult',
'RetentionPolicyParameters',
'TrafficAnalyticsConfigurationProperties',
'FlowLogStatusParameters',
'FlowLogInformation',
'ConnectivitySource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -28,19 +29,24 @@ 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 = {
'target_resource_id': {'key': 'targetResourceId', 'type': 'str'},
'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):
Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -28,24 +29,30 @@ 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 = {
'target_resource_id': {'key': 'targetResourceId', 'type': 'str'},
'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
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -1210,15 +1211,16 @@ 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.
:type resource_group_name: str
: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
Expand Down