From 899e951456cd866bce6b285119eeef23a027c28b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 12 Nov 2018 09:55:58 -0800 Subject: [PATCH 01/17] Generated from 84624804865be53090660f859760f153de313691 (#3781) merged from master --- .../azure/mgmt/security/models/__init__.py | 13 + .../models/allowed_connections_resource.py | 63 +++++ .../allowed_connections_resource_paged.py | 27 ++ .../allowed_connections_resource_py3.py | 63 +++++ .../security/models/connectable_resource.py | 49 ++++ .../models/connectable_resource_py3.py | 49 ++++ .../security/models/connected_resource.py | 46 ++++ .../security/models/connected_resource_py3.py | 46 ++++ .../security/models/security_center_enums.py | 6 + .../mgmt/security/operations/__init__.py | 2 + .../allowed_connections_operations.py | 236 ++++++++++++++++++ .../azure/mgmt/security/security_center.py | 5 + 12 files changed, 605 insertions(+) create mode 100644 azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/connected_resource.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 059deadbd310..47bdff08e273 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -60,6 +60,9 @@ from .external_security_solution_kind1_py3 import ExternalSecuritySolutionKind1 from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties from .aad_connectivity_state1_py3 import AadConnectivityState1 + from .connected_resource_py3 import ConnectedResource + from .connectable_resource_py3 import ConnectableResource + from .allowed_connections_resource_py3 import AllowedConnectionsResource except (SyntaxError, ImportError): from .resource import Resource from .kind import Kind @@ -111,6 +114,9 @@ from .external_security_solution_kind1 import ExternalSecuritySolutionKind1 from .external_security_solution_properties import ExternalSecuritySolutionProperties from .aad_connectivity_state1 import AadConnectivityState1 + from .connected_resource import ConnectedResource + from .connectable_resource import ConnectableResource + from .allowed_connections_resource import AllowedConnectionsResource from .pricing_paged import PricingPaged from .security_contact_paged import SecurityContactPaged from .workspace_setting_paged import WorkspaceSettingPaged @@ -126,6 +132,7 @@ from .jit_network_access_policy_paged import JitNetworkAccessPolicyPaged from .external_security_solution_paged import ExternalSecuritySolutionPaged from .topology_resource_paged import TopologyResourcePaged +from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged from .security_center_enums import ( AlertNotifications, AlertsToAdmins, @@ -138,6 +145,7 @@ StatusReason, AadConnectivityState, ExternalSecuritySolutionKind, + ConnectionType, ) __all__ = [ @@ -191,6 +199,9 @@ 'ExternalSecuritySolutionKind1', 'ExternalSecuritySolutionProperties', 'AadConnectivityState1', + 'ConnectedResource', + 'ConnectableResource', + 'AllowedConnectionsResource', 'PricingPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', @@ -206,6 +217,7 @@ 'JitNetworkAccessPolicyPaged', 'ExternalSecuritySolutionPaged', 'TopologyResourcePaged', + 'AllowedConnectionsResourcePaged', 'AlertNotifications', 'AlertsToAdmins', 'PricingTier', @@ -217,4 +229,5 @@ 'StatusReason', 'AadConnectivityState', 'ExternalSecuritySolutionKind', + 'ConnectionType', ] diff --git a/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py b/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py new file mode 100644 index 000000000000..a33332d21a3a --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py @@ -0,0 +1,63 @@ +# 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 AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs): + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py b/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py new file mode 100644 index 000000000000..6a1696891e15 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_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 AllowedConnectionsResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AllowedConnectionsResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AllowedConnectionsResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AllowedConnectionsResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py b/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py new file mode 100644 index 000000000000..c6cc09b53298 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py @@ -0,0 +1,63 @@ +# 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 AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py b/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py new file mode 100644 index 000000000000..617931b620d2 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py @@ -0,0 +1,49 @@ +# 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 ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs): + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py b/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py new file mode 100644 index 000000000000..405942f2b228 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py @@ -0,0 +1,49 @@ +# 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 ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py b/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py new file mode 100644 index 000000000000..cb4e417044cd --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py @@ -0,0 +1,46 @@ +# 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 ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py b/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py new file mode 100644 index 000000000000..509629455e1c --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py @@ -0,0 +1,46 @@ +# 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 ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 64f3905e4f14..951d2c9525c7 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -81,3 +81,9 @@ class ExternalSecuritySolutionKind(str, Enum): cef = "CEF" ata = "ATA" aad = "AAD" + + +class ConnectionType(str, Enum): + + internal = "Internal" + external = "External" diff --git a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index 14d284151ba7..cc451ba3dd54 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -25,6 +25,7 @@ from .jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations from .external_security_solutions_operations import ExternalSecuritySolutionsOperations from .topology_operations import TopologyOperations +from .allowed_connections_operations import AllowedConnectionsOperations __all__ = [ 'PricingsOperations', @@ -43,4 +44,5 @@ 'JitNetworkAccessPoliciesOperations', 'ExternalSecuritySolutionsOperations', 'TopologyOperations', + 'AllowedConnectionsOperations', ] diff --git a/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py new file mode 100644 index 000000000000..2d97b7366913 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py @@ -0,0 +1,236 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AllowedConnectionsOperations(object): + """AllowedConnectionsOperations 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: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of all possible traffic between resources for the + subscription. + + :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 AllowedConnectionsResource + :rtype: + ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] + :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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections'} + + def list_by_home_region( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of all possible traffic between resources for the + subscription and location. + + :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 AllowedConnectionsResource + :rtype: + ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_home_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections'} + + def get( + self, resource_group_name, connection_type, custom_headers=None, raw=False, **operation_config): + """Gets the list of all possible traffic between resources for the + subscription and location, based on connection type. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param connection_type: The type of allowed connections (Internal, + External). Possible values include: 'Internal', 'External' + :type connection_type: str or + ~azure.mgmt.security.models.ConnectionType + :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: AllowedConnectionsResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AllowedConnectionsResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'connectionType': self._serialize.url("connection_type", connection_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AllowedConnectionsResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}'} diff --git a/azure-mgmt-security/azure/mgmt/security/security_center.py b/azure-mgmt-security/azure/mgmt/security/security_center.py index a51e73196e67..4a70b5762f4f 100644 --- a/azure-mgmt-security/azure/mgmt/security/security_center.py +++ b/azure-mgmt-security/azure/mgmt/security/security_center.py @@ -29,6 +29,7 @@ from .operations.jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations from .operations.external_security_solutions_operations import ExternalSecuritySolutionsOperations from .operations.topology_operations import TopologyOperations +from .operations.allowed_connections_operations import AllowedConnectionsOperations from . import models @@ -108,6 +109,8 @@ class SecurityCenter(SDKClient): :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations :ivar topology: Topology operations :vartype topology: azure.mgmt.security.operations.TopologyOperations + :ivar allowed_connections: AllowedConnections operations + :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -162,3 +165,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.topology = TopologyOperations( self._client, self.config, self._serialize, self._deserialize) + self.allowed_connections = AllowedConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) From 906f411b93201949ab4bc8237028d21057772f4e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 12 Nov 2018 10:35:49 -0800 Subject: [PATCH 02/17] [AutoPR security/resource-manager] Remove security contact phone field mandatory fields (#3753) * Generated from 3f99e72342d5d4f194ff74c8c553657530955783 Remove security contact phone field mandatory fields * Generated from e94d9f5b16a429a3f1d2270a981be7218f06fd36 Update security contact examples - refactored - second iteration --- .../azure/mgmt/security/models/security_contact.py | 3 +-- .../azure/mgmt/security/models/security_contact_py3.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_contact.py b/azure-mgmt-security/azure/mgmt/security/models/security_contact.py index 95f1211214fd..43926670b0ec 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_contact.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_contact.py @@ -28,7 +28,7 @@ class SecurityContact(Resource): :vartype type: str :param email: Required. The email of this security contact :type email: str - :param phone: Required. The phone number of this security contact + :param phone: The phone number of this security contact :type phone: str :param alert_notifications: Required. Whether to send security alerts notifications to the security contact. Possible values include: 'On', @@ -45,7 +45,6 @@ class SecurityContact(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'email': {'required': True}, - 'phone': {'required': True}, 'alert_notifications': {'required': True}, 'alerts_to_admins': {'required': True}, } diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py b/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py index 5142ff09660c..6a78f995545a 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py @@ -28,7 +28,7 @@ class SecurityContact(Resource): :vartype type: str :param email: Required. The email of this security contact :type email: str - :param phone: Required. The phone number of this security contact + :param phone: The phone number of this security contact :type phone: str :param alert_notifications: Required. Whether to send security alerts notifications to the security contact. Possible values include: 'On', @@ -45,7 +45,6 @@ class SecurityContact(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'email': {'required': True}, - 'phone': {'required': True}, 'alert_notifications': {'required': True}, 'alerts_to_admins': {'required': True}, } @@ -60,7 +59,7 @@ class SecurityContact(Resource): 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, } - def __init__(self, *, email: str, phone: str, alert_notifications, alerts_to_admins, **kwargs) -> None: + def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: str=None, **kwargs) -> None: super(SecurityContact, self).__init__(**kwargs) self.email = email self.phone = phone From b742759565ab8458f39b4761ba3f0a8a79640bca Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 5 Dec 2018 10:35:39 -0800 Subject: [PATCH 03/17] Generated from e691835335c3acf12428c89776c765a1fa2bdad5 (#3989) typo: security/resource-manager/Microsoft.Security - Double word "alert" - addess -> address - whos -> whose --- .../azure/mgmt/security/models/external_security_solution.py | 2 +- .../mgmt/security/models/external_security_solution_py3.py | 2 +- .../azure/mgmt/security/operations/alerts_operations.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py b/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py index d9e655a91baa..0eb60137c0c0 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py +++ b/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py @@ -14,7 +14,7 @@ class ExternalSecuritySolution(Model): """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whos data is displayed by Azure + sends information to an OMS workspace and whose data is displayed by Azure Security Center. You probably want to use the sub-classes and not this class directly. Known diff --git a/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py b/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py index a7495db0f8a3..798e808ddfab 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py @@ -14,7 +14,7 @@ class ExternalSecuritySolution(Model): """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whos data is displayed by Azure + sends information to an OMS workspace and whose data is displayed by Azure Security Center. You probably want to use the sub-classes and not this class directly. Known diff --git a/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py index 5ce45a717eb5..9d7f01c1b7c6 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py @@ -115,7 +115,7 @@ def internal_paging(next_link=None, raw=False): def list_by_resource_group( self, resource_group_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """List all the alerts alerts that are associated with the resource group. + """List all the alerts that are associated with the resource group. :param resource_group_name: The name of the resource group within the user's subscription. The name is case insensitive. From 9e455100ba9166a2bf865e831131074d6b45b282 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 2 Jan 2019 09:18:39 -0800 Subject: [PATCH 04/17] Generated from 1a24198dd982a4fcb510456404994241f55dc883 (#4113) Settings API --- .../azure/mgmt/security/models/__init__.py | 6 +-- .../security/models/data_export_setting.py | 7 +-- .../models/data_export_setting_py3.py | 11 ++-- .../security/models/security_center_enums.py | 1 + .../azure/mgmt/security/models/setting.py | 21 +++----- .../mgmt/security/models/setting_kind1.py | 29 ----------- .../mgmt/security/models/setting_kind1_py3.py | 29 ----------- .../azure/mgmt/security/models/setting_py3.py | 25 +++------ .../mgmt/security/models/setting_resource.py | 51 +++++++++++++++++++ .../security/models/setting_resource_py3.py | 51 +++++++++++++++++++ .../operations/settings_operations.py | 18 ++++--- 11 files changed, 141 insertions(+), 108 deletions(-) delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/setting_kind1.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/setting_kind1_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/setting_resource.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 47bdff08e273..0c052e4712b5 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -21,7 +21,7 @@ from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting from .setting_py3 import Setting from .data_export_setting_py3 import DataExportSetting - from .setting_kind1_py3 import SettingKind1 + from .setting_resource_py3 import SettingResource from .sensitivity_label_py3 import SensitivityLabel from .information_protection_keyword_py3 import InformationProtectionKeyword from .information_type_py3 import InformationType @@ -75,7 +75,7 @@ from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting from .setting import Setting from .data_export_setting import DataExportSetting - from .setting_kind1 import SettingKind1 + from .setting_resource import SettingResource from .sensitivity_label import SensitivityLabel from .information_protection_keyword import InformationProtectionKeyword from .information_type import InformationType @@ -160,7 +160,7 @@ 'AdvancedThreatProtectionSetting', 'Setting', 'DataExportSetting', - 'SettingKind1', + 'SettingResource', 'SensitivityLabel', 'InformationProtectionKeyword', 'InformationType', diff --git a/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py b/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py index c2eb09c8bebe..8c355e50e6ff 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py +++ b/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py @@ -26,8 +26,10 @@ class DataExportSetting(Setting): :vartype name: str :ivar type: Resource type :vartype type: str - :param kind: Required. Constant filled by server. - :type kind: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind :param enabled: Required. Is the data export setting is enabled :type enabled: bool """ @@ -51,4 +53,3 @@ class DataExportSetting(Setting): def __init__(self, **kwargs): super(DataExportSetting, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) - self.kind = 'DataExportSetting' diff --git a/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py b/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py index adab9fae1f04..05d8e11208fc 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py @@ -26,8 +26,10 @@ class DataExportSetting(Setting): :vartype name: str :ivar type: Resource type :vartype type: str - :param kind: Required. Constant filled by server. - :type kind: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind :param enabled: Required. Is the data export setting is enabled :type enabled: bool """ @@ -48,7 +50,6 @@ class DataExportSetting(Setting): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(DataExportSetting, self).__init__(**kwargs) + def __init__(self, *, kind, enabled: bool, **kwargs) -> None: + super(DataExportSetting, self).__init__(kind=kind, **kwargs) self.enabled = enabled - self.kind = 'DataExportSetting' diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 951d2c9525c7..fc73b5aaf5d9 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -39,6 +39,7 @@ class AutoProvision(str, Enum): class SettingKind(str, Enum): data_export_setting = "DataExportSetting" + alert_suppression_setting = "AlertSuppressionSetting" class SecurityFamily(str, Enum): diff --git a/azure-mgmt-security/azure/mgmt/security/models/setting.py b/azure-mgmt-security/azure/mgmt/security/models/setting.py index 6d9a06822f41..9dd2c8f9944c 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/setting.py +++ b/azure-mgmt-security/azure/mgmt/security/models/setting.py @@ -9,15 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .setting_resource import SettingResource -class Setting(Model): +class Setting(SettingResource): """Represents a security setting in Azure Security Center. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataExportSetting - Variables are only populated by the server, and will be ignored when sending a request. @@ -29,8 +26,10 @@ class Setting(Model): :vartype name: str :ivar type: Resource type :vartype type: str - :param kind: Required. Constant filled by server. - :type kind: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind """ _validation = { @@ -47,13 +46,5 @@ class Setting(Model): 'kind': {'key': 'kind', 'type': 'str'}, } - _subtype_map = { - 'kind': {'DataExportSetting': 'DataExportSetting'} - } - def __init__(self, **kwargs): super(Setting, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/setting_kind1.py b/azure-mgmt-security/azure/mgmt/security/models/setting_kind1.py deleted file mode 100644 index 4f3753aae68d..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/setting_kind1.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SettingKind1(Model): - """The kind of the security setting. - - :param kind: the kind of the settings string. Possible values include: - 'DataExportSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SettingKind1, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/setting_kind1_py3.py b/azure-mgmt-security/azure/mgmt/security/models/setting_kind1_py3.py deleted file mode 100644 index 33f8f077ff41..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/setting_kind1_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SettingKind1(Model): - """The kind of the security setting. - - :param kind: the kind of the settings string. Possible values include: - 'DataExportSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(SettingKind1, self).__init__(**kwargs) - self.kind = kind diff --git a/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py b/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py index fa644684fb2f..0611d4ebdd49 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py @@ -9,15 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .setting_resource_py3 import SettingResource -class Setting(Model): +class Setting(SettingResource): """Represents a security setting in Azure Security Center. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataExportSetting - Variables are only populated by the server, and will be ignored when sending a request. @@ -29,8 +26,10 @@ class Setting(Model): :vartype name: str :ivar type: Resource type :vartype type: str - :param kind: Required. Constant filled by server. - :type kind: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind """ _validation = { @@ -47,13 +46,5 @@ class Setting(Model): 'kind': {'key': 'kind', 'type': 'str'}, } - _subtype_map = { - 'kind': {'DataExportSetting': 'DataExportSetting'} - } - - def __init__(self, **kwargs) -> None: - super(Setting, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = None + def __init__(self, *, kind, **kwargs) -> None: + super(Setting, self).__init__(kind=kind, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py b/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py new file mode 100644 index 000000000000..d20bda7cab66 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/setting_resource.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 .resource import Resource + + +class SettingResource(Resource): + """The kind of the security setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SettingResource, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py b/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py new file mode 100644 index 000000000000..4feeff7166c5 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/setting_resource_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 .resource_py3 import Resource + + +class SettingResource(Resource): + """The kind of the security setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind, **kwargs) -> None: + super(SettingResource, self).__init__(**kwargs) + self.kind = kind diff --git a/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py index 47b9c1b6d7f5..6aef42b410e1 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py @@ -105,8 +105,8 @@ def get( self, setting_name, custom_headers=None, raw=False, **operation_config): """Settings of different configurations in security center. - :param setting_name: Name of setting. Possible values include: 'MCAS', - 'WDATP' + :param setting_name: Name of setting: (MCAS/WDATP). Possible values + include: 'MCAS', 'WDATP' :type setting_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -162,14 +162,16 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}'} def update( - self, setting_name, setting, custom_headers=None, raw=False, **operation_config): + self, setting_name, kind, custom_headers=None, raw=False, **operation_config): """updating settings about different configurations in security center. - :param setting_name: Name of setting. Possible values include: 'MCAS', - 'WDATP' + :param setting_name: Name of setting: (MCAS/WDATP). Possible values + include: 'MCAS', 'WDATP' :type setting_name: str - :param setting: Setting object - :type setting: ~azure.mgmt.security.models.Setting + :param kind: the kind of the settings string (DataExportSetting). + Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -180,6 +182,8 @@ def update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + setting = models.Setting(kind=kind) + # Construct URL url = self.update.metadata['url'] path_format_arguments = { From 16c67ab984be32e1d767e28da8d2aa0a568fdb40 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 22 Jan 2019 13:48:22 -0800 Subject: [PATCH 05/17] Generated from 5d46282b1371de397d3d60083b6485ff73332f93 (#4216) add comma --- .../security/operations/workspace_settings_operations.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py index d92f1831e26a..7c25fa3c51ab 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py @@ -39,7 +39,9 @@ def __init__(self, client, config, serializer, deserializer): def list( self, custom_headers=None, raw=False, **operation_config): - """Settings about where we should store your security data and logs. + """Settings about where we should store your security data and logs. If + the result is empty, it means that no custom-workspace configuration + was set. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -103,7 +105,9 @@ def internal_paging(next_link=None, raw=False): def get( self, workspace_setting_name, custom_headers=None, raw=False, **operation_config): - """Settings about where we should store your security data and logs. + """Settings about where we should store your security data and logs. If + the result is empty, it means that no custom-workspace configuration + was set. :param workspace_setting_name: Name of the security setting :type workspace_setting_name: str From 5d9275ea627bb78f4d6f75b8a152cdf8aaa2d5ed Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 1 Feb 2019 11:04:19 -0800 Subject: [PATCH 06/17] [AutoPR security/resource-manager] Adding new api-version to Microsoft.Security Alerts resource (#4283) * Generated from f862d11a6a08b6c7243a79c2996690518313ac9a Rollback readme change * Packaging update of azure-mgmt-security --- azure-mgmt-security/README.rst | 19 ------------------- .../azure/mgmt/security/models/__init__.py | 2 ++ .../azure/mgmt/security/models/alert.py | 12 ++++++++++-- .../azure/mgmt/security/models/alert_py3.py | 12 ++++++++++-- .../security/models/security_center_enums.py | 8 ++++++++ 5 files changed, 30 insertions(+), 23 deletions(-) diff --git a/azure-mgmt-security/README.rst b/azure-mgmt-security/README.rst index b2ad14672aa9..d61634454d3e 100644 --- a/azure-mgmt-security/README.rst +++ b/azure-mgmt-security/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 0c052e4712b5..ff8b9164b7ee 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -139,6 +139,7 @@ PricingTier, AutoProvision, SettingKind, + ReportedSeverity, SecurityFamily, Protocol, Status, @@ -223,6 +224,7 @@ 'PricingTier', 'AutoProvision', 'SettingKind', + 'ReportedSeverity', 'SecurityFamily', 'Protocol', 'Status', diff --git a/azure-mgmt-security/azure/mgmt/security/models/alert.py b/azure-mgmt-security/azure/mgmt/security/models/alert.py index bdd5963a2b38..638d4f8d87ad 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/alert.py +++ b/azure-mgmt-security/azure/mgmt/security/models/alert.py @@ -44,8 +44,10 @@ class Alert(Resource): :ivar action_taken: The action that was taken as a response to the alert (Active, Blocked etc.) :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert - :vartype reported_severity: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Silent', 'Information', 'Low', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity :ivar compromised_entity: The entity that the incident happened on :vartype compromised_entity: str :ivar associated_resource: Azure resource ID of the associated resource @@ -57,6 +59,9 @@ class Alert(Resource): :ivar can_be_investigated: Whether this alert can be investigated with Azure Security Center :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool :param entities: objects that are related to this alerts :type entities: list[~azure.mgmt.security.models.AlertEntity] :ivar confidence_score: level of confidence we have on the alert @@ -93,6 +98,7 @@ class Alert(Resource): 'associated_resource': {'readonly': True}, 'system_source': {'readonly': True}, 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, 'subscription_id': {'readonly': True}, 'instance_id': {'readonly': True}, @@ -118,6 +124,7 @@ class Alert(Resource): 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, @@ -143,6 +150,7 @@ def __init__(self, **kwargs): self.extended_properties = kwargs.get('extended_properties', None) self.system_source = None self.can_be_investigated = None + self.is_incident = None self.entities = kwargs.get('entities', None) self.confidence_score = None self.confidence_reasons = kwargs.get('confidence_reasons', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py b/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py index b5c9aff63df5..49d00f40877e 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py @@ -44,8 +44,10 @@ class Alert(Resource): :ivar action_taken: The action that was taken as a response to the alert (Active, Blocked etc.) :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert - :vartype reported_severity: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Silent', 'Information', 'Low', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity :ivar compromised_entity: The entity that the incident happened on :vartype compromised_entity: str :ivar associated_resource: Azure resource ID of the associated resource @@ -57,6 +59,9 @@ class Alert(Resource): :ivar can_be_investigated: Whether this alert can be investigated with Azure Security Center :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool :param entities: objects that are related to this alerts :type entities: list[~azure.mgmt.security.models.AlertEntity] :ivar confidence_score: level of confidence we have on the alert @@ -93,6 +98,7 @@ class Alert(Resource): 'associated_resource': {'readonly': True}, 'system_source': {'readonly': True}, 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, 'subscription_id': {'readonly': True}, 'instance_id': {'readonly': True}, @@ -118,6 +124,7 @@ class Alert(Resource): 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, @@ -143,6 +150,7 @@ def __init__(self, *, extended_properties=None, entities=None, confidence_reason self.extended_properties = extended_properties self.system_source = None self.can_be_investigated = None + self.is_incident = None self.entities = entities self.confidence_score = None self.confidence_reasons = confidence_reasons diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index fc73b5aaf5d9..645bc5d68041 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -42,6 +42,14 @@ class SettingKind(str, Enum): alert_suppression_setting = "AlertSuppressionSetting" +class ReportedSeverity(str, Enum): + + silent = "Silent" + information = "Information" + low = "Low" + high = "High" + + class SecurityFamily(str, Enum): waf = "Waf" From 1dadbdd84db2ee77507c13dccd4d6b3f1e33009e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 25 Feb 2019 10:38:52 -0800 Subject: [PATCH 07/17] [AutoPR security/resource-manager] Azure Security Center - break-to-composite v1 (#4354) * Generated from 2a8aacac69e7675f0417a2dee3770256656042c8 first break-to-composite attempt * Generated from 6cbbbe2e2e840c19e3f97332dbc44d0eb4049ce5 Azure Security Center - add missing 2017-08-01-preview api-version + bugfixes --- .../azure/mgmt/security/models/__init__.py | 52 +++++++++---------- .../security/models/security_center_enums.py | 12 ++--- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index ff8b9164b7ee..7a8805c9b250 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -10,10 +10,10 @@ # -------------------------------------------------------------------------- try: + from .pricing_py3 import Pricing + from .asc_location_py3 import AscLocation from .resource_py3 import Resource - from .kind_py3 import Kind from .security_contact_py3 import SecurityContact - from .pricing_py3 import Pricing from .workspace_setting_py3 import WorkspaceSetting from .auto_provisioning_setting_py3 import AutoProvisioningSetting from .compliance_segment_py3 import ComplianceSegment @@ -26,20 +26,15 @@ from .information_protection_keyword_py3 import InformationProtectionKeyword from .information_type_py3 import InformationType from .information_protection_policy_py3 import InformationProtectionPolicy - from .location_py3 import Location from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .security_task_parameters_py3 import SecurityTaskParameters from .security_task_py3 import SecurityTask - from .asc_location_py3 import AscLocation from .alert_entity_py3 import AlertEntity from .alert_confidence_reason_py3 import AlertConfidenceReason from .alert_py3 import Alert from .discovered_security_solution_py3 import DiscoveredSecuritySolution - from .topology_single_resource_parent_py3 import TopologySingleResourceParent - from .topology_single_resource_child_py3 import TopologySingleResourceChild - from .topology_single_resource_py3 import TopologySingleResource - from .topology_resource_py3 import TopologyResource + from .location_py3 import Location from .jit_network_access_port_rule_py3 import JitNetworkAccessPortRule from .jit_network_access_policy_virtual_machine_py3 import JitNetworkAccessPolicyVirtualMachine from .jit_network_access_request_port_py3 import JitNetworkAccessRequestPort @@ -49,6 +44,7 @@ from .jit_network_access_policy_initiate_port_py3 import JitNetworkAccessPolicyInitiatePort from .jit_network_access_policy_initiate_virtual_machine_py3 import JitNetworkAccessPolicyInitiateVirtualMachine from .jit_network_access_policy_initiate_request_py3 import JitNetworkAccessPolicyInitiateRequest + from .kind_py3 import Kind from .external_security_solution_py3 import ExternalSecuritySolution from .cef_solution_properties_py3 import CefSolutionProperties from .cef_external_security_solution_py3 import CefExternalSecuritySolution @@ -60,14 +56,18 @@ from .external_security_solution_kind1_py3 import ExternalSecuritySolutionKind1 from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties from .aad_connectivity_state1_py3 import AadConnectivityState1 + from .topology_single_resource_parent_py3 import TopologySingleResourceParent + from .topology_single_resource_child_py3 import TopologySingleResourceChild + from .topology_single_resource_py3 import TopologySingleResource + from .topology_resource_py3 import TopologyResource from .connected_resource_py3 import ConnectedResource from .connectable_resource_py3 import ConnectableResource from .allowed_connections_resource_py3 import AllowedConnectionsResource except (SyntaxError, ImportError): + from .pricing import Pricing + from .asc_location import AscLocation from .resource import Resource - from .kind import Kind from .security_contact import SecurityContact - from .pricing import Pricing from .workspace_setting import WorkspaceSetting from .auto_provisioning_setting import AutoProvisioningSetting from .compliance_segment import ComplianceSegment @@ -80,20 +80,15 @@ from .information_protection_keyword import InformationProtectionKeyword from .information_type import InformationType from .information_protection_policy import InformationProtectionPolicy - from .location import Location from .operation_display import OperationDisplay from .operation import Operation from .security_task_parameters import SecurityTaskParameters from .security_task import SecurityTask - from .asc_location import AscLocation from .alert_entity import AlertEntity from .alert_confidence_reason import AlertConfidenceReason from .alert import Alert from .discovered_security_solution import DiscoveredSecuritySolution - from .topology_single_resource_parent import TopologySingleResourceParent - from .topology_single_resource_child import TopologySingleResourceChild - from .topology_single_resource import TopologySingleResource - from .topology_resource import TopologyResource + from .location import Location from .jit_network_access_port_rule import JitNetworkAccessPortRule from .jit_network_access_policy_virtual_machine import JitNetworkAccessPolicyVirtualMachine from .jit_network_access_request_port import JitNetworkAccessRequestPort @@ -103,6 +98,7 @@ from .jit_network_access_policy_initiate_port import JitNetworkAccessPolicyInitiatePort from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest + from .kind import Kind from .external_security_solution import ExternalSecuritySolution from .cef_solution_properties import CefSolutionProperties from .cef_external_security_solution import CefExternalSecuritySolution @@ -114,6 +110,10 @@ from .external_security_solution_kind1 import ExternalSecuritySolutionKind1 from .external_security_solution_properties import ExternalSecuritySolutionProperties from .aad_connectivity_state1 import AadConnectivityState1 + from .topology_single_resource_parent import TopologySingleResourceParent + from .topology_single_resource_child import TopologySingleResourceChild + from .topology_single_resource import TopologySingleResource + from .topology_resource import TopologyResource from .connected_resource import ConnectedResource from .connectable_resource import ConnectableResource from .allowed_connections_resource import AllowedConnectionsResource @@ -134,9 +134,9 @@ from .topology_resource_paged import TopologyResourcePaged from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged from .security_center_enums import ( + PricingTier, AlertNotifications, AlertsToAdmins, - PricingTier, AutoProvision, SettingKind, ReportedSeverity, @@ -150,10 +150,10 @@ ) __all__ = [ + 'Pricing', + 'AscLocation', 'Resource', - 'Kind', 'SecurityContact', - 'Pricing', 'WorkspaceSetting', 'AutoProvisioningSetting', 'ComplianceSegment', @@ -166,20 +166,15 @@ 'InformationProtectionKeyword', 'InformationType', 'InformationProtectionPolicy', - 'Location', 'OperationDisplay', 'Operation', 'SecurityTaskParameters', 'SecurityTask', - 'AscLocation', 'AlertEntity', 'AlertConfidenceReason', 'Alert', 'DiscoveredSecuritySolution', - 'TopologySingleResourceParent', - 'TopologySingleResourceChild', - 'TopologySingleResource', - 'TopologyResource', + 'Location', 'JitNetworkAccessPortRule', 'JitNetworkAccessPolicyVirtualMachine', 'JitNetworkAccessRequestPort', @@ -189,6 +184,7 @@ 'JitNetworkAccessPolicyInitiatePort', 'JitNetworkAccessPolicyInitiateVirtualMachine', 'JitNetworkAccessPolicyInitiateRequest', + 'Kind', 'ExternalSecuritySolution', 'CefSolutionProperties', 'CefExternalSecuritySolution', @@ -200,6 +196,10 @@ 'ExternalSecuritySolutionKind1', 'ExternalSecuritySolutionProperties', 'AadConnectivityState1', + 'TopologySingleResourceParent', + 'TopologySingleResourceChild', + 'TopologySingleResource', + 'TopologyResource', 'ConnectedResource', 'ConnectableResource', 'AllowedConnectionsResource', @@ -219,9 +219,9 @@ 'ExternalSecuritySolutionPaged', 'TopologyResourcePaged', 'AllowedConnectionsResourcePaged', + 'PricingTier', 'AlertNotifications', 'AlertsToAdmins', - 'PricingTier', 'AutoProvision', 'SettingKind', 'ReportedSeverity', diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 645bc5d68041..3f208a7cddd8 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -12,6 +12,12 @@ from enum import Enum +class PricingTier(str, Enum): + + free = "Free" #: Get free Azure security center experience with basic security features + standard = "Standard" #: Get the standard Azure security center experience with advanced security features + + class AlertNotifications(str, Enum): on = "On" #: Get notifications on new alerts @@ -24,12 +30,6 @@ class AlertsToAdmins(str, Enum): off = "Off" #: Don't send notification on new alerts to the subscription's admins -class PricingTier(str, Enum): - - free = "Free" #: Get free Azure security center experience with basic security features - standard = "Standard" #: Get the standard Azure security center experience with advanced security features - - class AutoProvision(str, Enum): on = "On" #: Install missing security agent on VMs automatically From 6984828ed4ce8216036b5a0c535f4b9c2c252084 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 28 Feb 2019 09:57:24 -0800 Subject: [PATCH 08/17] [AutoPR security/resource-manager] Security - Updating API versions of alerts and pricing types (#4423) * Generated from 6b10f3754b112658124483817ff82792d4de2fcc Security - Updating api versions of alerts and pricing types * Generated from 67e18cba585922ac70f701db683e2cf8a4b6d19f Security - Updating api versions of alerts and pricing types --- .../azure/mgmt/security/models/__init__.py | 5 +- .../azure/mgmt/security/models/alert.py | 2 +- .../azure/mgmt/security/models/alert_py3.py | 2 +- .../azure/mgmt/security/models/pricing.py | 10 +- .../mgmt/security/models/pricing_list.py | 34 +++ .../mgmt/security/models/pricing_list_py3.py | 34 +++ .../azure/mgmt/security/models/pricing_py3.py | 10 +- .../security/models/security_center_enums.py | 4 +- .../security/operations/alerts_operations.py | 4 +- .../operations/pricings_operations.py | 248 ++---------------- .../azure/mgmt/security/version.py | 2 +- 11 files changed, 112 insertions(+), 243 deletions(-) create mode 100644 azure-mgmt-security/azure/mgmt/security/models/pricing_list.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 7a8805c9b250..b72e7878ab32 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -11,6 +11,7 @@ try: from .pricing_py3 import Pricing + from .pricing_list_py3 import PricingList from .asc_location_py3 import AscLocation from .resource_py3 import Resource from .security_contact_py3 import SecurityContact @@ -65,6 +66,7 @@ from .allowed_connections_resource_py3 import AllowedConnectionsResource except (SyntaxError, ImportError): from .pricing import Pricing + from .pricing_list import PricingList from .asc_location import AscLocation from .resource import Resource from .security_contact import SecurityContact @@ -117,7 +119,6 @@ from .connected_resource import ConnectedResource from .connectable_resource import ConnectableResource from .allowed_connections_resource import AllowedConnectionsResource -from .pricing_paged import PricingPaged from .security_contact_paged import SecurityContactPaged from .workspace_setting_paged import WorkspaceSettingPaged from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged @@ -151,6 +152,7 @@ __all__ = [ 'Pricing', + 'PricingList', 'AscLocation', 'Resource', 'SecurityContact', @@ -203,7 +205,6 @@ 'ConnectedResource', 'ConnectableResource', 'AllowedConnectionsResource', - 'PricingPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', 'AutoProvisioningSettingPaged', diff --git a/azure-mgmt-security/azure/mgmt/security/models/alert.py b/azure-mgmt-security/azure/mgmt/security/models/alert.py index 638d4f8d87ad..965e5877b722 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/alert.py +++ b/azure-mgmt-security/azure/mgmt/security/models/alert.py @@ -45,7 +45,7 @@ class Alert(Resource): (Active, Blocked etc.) :vartype action_taken: str :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Silent', 'Information', 'Low', 'High' + include: 'Informational', 'Low', 'Medium', 'High' :vartype reported_severity: str or ~azure.mgmt.security.models.ReportedSeverity :ivar compromised_entity: The entity that the incident happened on diff --git a/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py b/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py index 49d00f40877e..c73685113d7a 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py @@ -45,7 +45,7 @@ class Alert(Resource): (Active, Blocked etc.) :vartype action_taken: str :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Silent', 'Information', 'Low', 'High' + include: 'Informational', 'Low', 'Medium', 'High' :vartype reported_severity: str or ~azure.mgmt.security.models.ReportedSeverity :ivar compromised_entity: The entity that the incident happened on diff --git a/azure-mgmt-security/azure/mgmt/security/models/pricing.py b/azure-mgmt-security/azure/mgmt/security/models/pricing.py index 320e3dc9e4dc..8201c965f0a5 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/pricing.py +++ b/azure-mgmt-security/azure/mgmt/security/models/pricing.py @@ -26,9 +26,12 @@ class Pricing(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :param pricing_tier: Required. Pricing tier type. Possible values include: - 'Free', 'Standard' + :param pricing_tier: Required. The pricing tier value. Possible values + include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta """ _validation = { @@ -36,6 +39,7 @@ class Pricing(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, } _attribute_map = { @@ -43,8 +47,10 @@ class Pricing(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, } def __init__(self, **kwargs): super(Pricing, self).__init__(**kwargs) self.pricing_tier = kwargs.get('pricing_tier', None) + self.free_trial_remaining_time = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py b/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py new file mode 100644 index 000000000000..5c461c74609d --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, **kwargs): + super(PricingList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py b/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py new file mode 100644 index 000000000000..564f6bab68b9 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(PricingList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py b/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py index 25001e835a78..cab29e683d39 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py @@ -26,9 +26,12 @@ class Pricing(Resource): :vartype name: str :ivar type: Resource type :vartype type: str - :param pricing_tier: Required. Pricing tier type. Possible values include: - 'Free', 'Standard' + :param pricing_tier: Required. The pricing tier value. Possible values + include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta """ _validation = { @@ -36,6 +39,7 @@ class Pricing(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, } _attribute_map = { @@ -43,8 +47,10 @@ class Pricing(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, } def __init__(self, *, pricing_tier, **kwargs) -> None: super(Pricing, self).__init__(**kwargs) self.pricing_tier = pricing_tier + self.free_trial_remaining_time = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 3f208a7cddd8..6c105302e027 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -44,9 +44,9 @@ class SettingKind(str, Enum): class ReportedSeverity(str, Enum): - silent = "Silent" - information = "Information" + informational = "Informational" low = "Low" + medium = "Medium" high = "High" diff --git a/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py index 9d7f01c1b7c6..d0d86845ded3 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py @@ -23,7 +23,7 @@ class AlertsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-01-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-06-01-preview" + self.api_version = "2019-01-01" self.config = config diff --git a/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py index 60cc30172f7e..85177f446714 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py @@ -23,7 +23,7 @@ class PricingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2018-06-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2018-06-01" self.config = config @@ -46,151 +46,15 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of Pricing - :rtype: - ~azure.mgmt.security.models.PricingPaged[~azure.mgmt.security.models.Pricing] - :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 = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.PricingPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.PricingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configurations in the resource group. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Pricing - :rtype: - ~azure.mgmt.security.models.PricingPaged[~azure.mgmt.security.models.Pricing] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.PricingPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.PricingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings'} - - def get_subscription_pricing( - self, pricing_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscriptionSecurity pricing - configuration in the subscription. - - :param pricing_name: name of the pricing configuration - :type pricing_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: Pricing or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Pricing or + :return: PricingList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.PricingList or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_subscription_pricing.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') } url = self._client.format_url(url, **path_format_arguments) @@ -220,90 +84,19 @@ def get_subscription_pricing( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Pricing', response) + deserialized = self._deserialize('PricingList', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_subscription_pricing.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings'} - def update_subscription_pricing( - self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): + def get( + self, pricing_name, custom_headers=None, raw=False, **operation_config): """Security pricing configuration in the subscription. - :param pricing_name: name of the pricing configuration - :type pricing_name: str - :param pricing_tier: Pricing tier type. Possible values include: - 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :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: Pricing or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Pricing or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - pricing = models.Pricing(pricing_tier=pricing_tier) - - # Construct URL - url = self.update_subscription_pricing.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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(pricing, 'Pricing') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Pricing', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_subscription_pricing.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} - - def get_resource_group_pricing( - self, resource_group_name, pricing_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the resource group. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str :param pricing_name: name of the pricing configuration :type pricing_name: str :param dict custom_headers: headers that will be added to the request @@ -317,10 +110,9 @@ def get_resource_group_pricing( :raises: :class:`CloudError` """ # Construct URL - url = self.get_resource_group_pricing.metadata['url'] + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -358,18 +150,15 @@ def get_resource_group_pricing( return client_raw_response return deserialized - get_resource_group_pricing.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings/{pricingName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} - def create_or_update_resource_group_pricing( - self, resource_group_name, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the resource group. + def update( + self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): + """Security pricing configuration in the subscription. - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str :param pricing_name: name of the pricing configuration :type pricing_name: str - :param pricing_tier: Pricing tier type. Possible values include: + :param pricing_tier: The pricing tier value. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :param dict custom_headers: headers that will be added to the request @@ -385,10 +174,9 @@ def create_or_update_resource_group_pricing( pricing = models.Pricing(pricing_tier=pricing_tier) # Construct URL - url = self.create_or_update_resource_group_pricing.metadata['url'] + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -430,4 +218,4 @@ def create_or_update_resource_group_pricing( return client_raw_response return deserialized - create_or_update_resource_group_pricing.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings/{pricingName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/version.py b/azure-mgmt-security/azure/mgmt/security/version.py index e0ec669828cb..a39916c162ce 100644 --- a/azure-mgmt-security/azure/mgmt/security/version.py +++ b/azure-mgmt-security/azure/mgmt/security/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "1.0.0" From 9268ca40433194f6c75d058e26fa11364355f0ae Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Mon, 4 Mar 2019 16:32:39 +0000 Subject: [PATCH 09/17] Packaging update of azure-mgmt-security --- azure-mgmt-security/MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-mgmt-security/MANIFEST.in b/azure-mgmt-security/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/azure-mgmt-security/MANIFEST.in +++ b/azure-mgmt-security/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py From 3583676eabf1b31e32bc29d761b1c94c43840bff Mon Sep 17 00:00:00 2001 From: Isabella Cai Date: Mon, 4 Mar 2019 09:14:07 -0800 Subject: [PATCH 10/17] updated versioning and change log --- azure-mgmt-security/HISTORY.rst | 20 +++++++++++++++++++ .../azure/mgmt/security/version.py | 3 +-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-security/HISTORY.rst b/azure-mgmt-security/HISTORY.rst index 1e7b5a6824bd..ada19504aab6 100644 --- a/azure-mgmt-security/HISTORY.rst +++ b/azure-mgmt-security/HISTORY.rst @@ -3,6 +3,26 @@ Release History =============== +0.2.0 (2019-03-04) +++++++++++++++++++ + +**Features** + +- Model Pricing has a new parameter free_trial_remaining_time +- Model Alert has a new parameter is_incident +- Added operation PricingsOperations.get +- Added operation PricingsOperations.update +- Added operation group AllowedConnectionsOperations + +**Breaking changes** + +- Operation SettingsOperations.update has a new signature +- Removed operation PricingsOperations.update_subscription_pricing +- Removed operation PricingsOperations.list_by_resource_group +- Removed operation PricingsOperations.create_or_update_resource_group_pricing +- Removed operation PricingsOperations.get_resource_group_pricing +- Removed operation PricingsOperations.get_subscription_pricing + 0.1.0 (2018-10-29) ++++++++++++++++++ diff --git a/azure-mgmt-security/azure/mgmt/security/version.py b/azure-mgmt-security/azure/mgmt/security/version.py index a39916c162ce..c995f7836cef 100644 --- a/azure-mgmt-security/azure/mgmt/security/version.py +++ b/azure-mgmt-security/azure/mgmt/security/version.py @@ -9,5 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" - +VERSION = "0.2.0" From b12eab01dcd18553712d7c03d9b324d3ee4f84ac Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 4 Mar 2019 11:00:45 -0800 Subject: [PATCH 11/17] Generated from 16b35cff6f2a72e062a8098e0cb95ccc209e25af (#4459) reverted security python readme to pre multi api --- .../mgmt/security/models/pricing_paged.py | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/pricing_paged.py diff --git a/azure-mgmt-security/azure/mgmt/security/models/pricing_paged.py b/azure-mgmt-security/azure/mgmt/security/models/pricing_paged.py deleted file mode 100644 index 09eee4ab69dd..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/pricing_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PricingPaged(Paged): - """ - A paging container for iterating over a list of :class:`Pricing ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Pricing]'} - } - - def __init__(self, *args, **kwargs): - - super(PricingPaged, self).__init__(*args, **kwargs) From 418e8ac48d442969e2a71f16185a1def52e0c357 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 14 Mar 2019 17:16:31 -0700 Subject: [PATCH 12/17] [AutoPR security/resource-manager] Correlation Key property added (#4524) * Generated from 566b64da8e05aef201e8e3537edcd0c47530e360 typo fix * Packaging update of azure-mgmt-security * Generated from e620762eee468dab30a0eac68387dbaaed34cdc3 tabs switched to spaces + description changed to be more informative --- azure-mgmt-security/README.rst | 3 +++ azure-mgmt-security/azure/mgmt/security/models/alert.py | 6 ++++++ azure-mgmt-security/azure/mgmt/security/models/alert_py3.py | 6 ++++++ azure-mgmt-security/azure/mgmt/security/version.py | 3 ++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/azure-mgmt-security/README.rst b/azure-mgmt-security/README.rst index 558697deb50a..0d810d257cf9 100644 --- a/azure-mgmt-security/README.rst +++ b/azure-mgmt-security/README.rst @@ -28,3 +28,6 @@ Provide Feedback If you encounter any bugs or have suggestions, please file an issue in the `Issues `__ section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-security%2FREADME.png diff --git a/azure-mgmt-security/azure/mgmt/security/models/alert.py b/azure-mgmt-security/azure/mgmt/security/models/alert.py index 965e5877b722..a467fe8ffcbb 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/alert.py +++ b/azure-mgmt-security/azure/mgmt/security/models/alert.py @@ -78,6 +78,9 @@ class Alert(Resource): :ivar workspace_arm_id: Azure resource ID of the workspace that the alert was reported to. :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str """ _validation = { @@ -103,6 +106,7 @@ class Alert(Resource): 'subscription_id': {'readonly': True}, 'instance_id': {'readonly': True}, 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, } _attribute_map = { @@ -131,6 +135,7 @@ class Alert(Resource): 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, } def __init__(self, **kwargs): @@ -157,3 +162,4 @@ def __init__(self, **kwargs): self.subscription_id = None self.instance_id = None self.workspace_arm_id = None + self.correlation_key = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py b/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py index c73685113d7a..95007f9bb77a 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py +++ b/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py @@ -78,6 +78,9 @@ class Alert(Resource): :ivar workspace_arm_id: Azure resource ID of the workspace that the alert was reported to. :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str """ _validation = { @@ -103,6 +106,7 @@ class Alert(Resource): 'subscription_id': {'readonly': True}, 'instance_id': {'readonly': True}, 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, } _attribute_map = { @@ -131,6 +135,7 @@ class Alert(Resource): 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, } def __init__(self, *, extended_properties=None, entities=None, confidence_reasons=None, **kwargs) -> None: @@ -157,3 +162,4 @@ def __init__(self, *, extended_properties=None, entities=None, confidence_reason self.subscription_id = None self.instance_id = None self.workspace_arm_id = None + self.correlation_key = None diff --git a/azure-mgmt-security/azure/mgmt/security/version.py b/azure-mgmt-security/azure/mgmt/security/version.py index c995f7836cef..e0ec669828cb 100644 --- a/azure-mgmt-security/azure/mgmt/security/version.py +++ b/azure-mgmt-security/azure/mgmt/security/version.py @@ -9,4 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.1.0" + From 7619ab82f9d67fd212afbe277db94732b9b6cc4b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 25 Mar 2019 09:08:35 -0700 Subject: [PATCH 13/17] [AutoPR security/resource-manager] New security Regulatory compliance API (#4502) * Generated from 60b311c10c1de2583d21065332a28f65b6025e8b Regulatory compliance API * Packaging update of azure-mgmt-security * Generated from f2f06c6cb708b078507ff93bb5bd338416b27de7 Merge branch 'master' of https://github.com/himarkov/azure-rest-api-specs * Generated from 57997a34834cb3e70253fc7573647886666edb4f Update regulatoryCompliance.json --- .../azure/mgmt/security/models/__init__.py | 29 ++- .../regulatory_compliance_assessment.py | 89 ++++++++ .../regulatory_compliance_assessment_paged.py | 27 +++ .../regulatory_compliance_assessment_py3.py | 89 ++++++++ .../models/regulatory_compliance_control.py | 71 +++++++ .../regulatory_compliance_control_paged.py | 27 +++ .../regulatory_compliance_control_py3.py | 71 +++++++ .../models/regulatory_compliance_standard.py | 72 +++++++ .../regulatory_compliance_standard_paged.py | 27 +++ .../regulatory_compliance_standard_py3.py | 72 +++++++ .../security/models/security_center_enums.py | 8 + .../mgmt/security/operations/__init__.py | 6 + ...atory_compliance_assessments_operations.py | 193 ++++++++++++++++++ ...gulatory_compliance_controls_operations.py | 183 +++++++++++++++++ ...ulatory_compliance_standards_operations.py | 174 ++++++++++++++++ .../azure/mgmt/security/security_center.py | 15 ++ 16 files changed, 1147 insertions(+), 6 deletions(-) create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py create mode 100644 azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py create mode 100644 azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index b72e7878ab32..fbde841263d3 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -10,10 +10,13 @@ # -------------------------------------------------------------------------- try: - from .pricing_py3 import Pricing - from .pricing_list_py3 import PricingList + from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard + from .regulatory_compliance_control_py3 import RegulatoryComplianceControl + from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment from .asc_location_py3 import AscLocation from .resource_py3 import Resource + from .pricing_py3 import Pricing + from .pricing_list_py3 import PricingList from .security_contact_py3 import SecurityContact from .workspace_setting_py3 import WorkspaceSetting from .auto_provisioning_setting_py3 import AutoProvisioningSetting @@ -65,10 +68,13 @@ from .connectable_resource_py3 import ConnectableResource from .allowed_connections_resource_py3 import AllowedConnectionsResource except (SyntaxError, ImportError): - from .pricing import Pricing - from .pricing_list import PricingList + from .regulatory_compliance_standard import RegulatoryComplianceStandard + from .regulatory_compliance_control import RegulatoryComplianceControl + from .regulatory_compliance_assessment import RegulatoryComplianceAssessment from .asc_location import AscLocation from .resource import Resource + from .pricing import Pricing + from .pricing_list import PricingList from .security_contact import SecurityContact from .workspace_setting import WorkspaceSetting from .auto_provisioning_setting import AutoProvisioningSetting @@ -119,6 +125,9 @@ from .connected_resource import ConnectedResource from .connectable_resource import ConnectableResource from .allowed_connections_resource import AllowedConnectionsResource +from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged +from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged +from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged from .security_contact_paged import SecurityContactPaged from .workspace_setting_paged import WorkspaceSettingPaged from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged @@ -135,6 +144,7 @@ from .topology_resource_paged import TopologyResourcePaged from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged from .security_center_enums import ( + State, PricingTier, AlertNotifications, AlertsToAdmins, @@ -151,10 +161,13 @@ ) __all__ = [ - 'Pricing', - 'PricingList', + 'RegulatoryComplianceStandard', + 'RegulatoryComplianceControl', + 'RegulatoryComplianceAssessment', 'AscLocation', 'Resource', + 'Pricing', + 'PricingList', 'SecurityContact', 'WorkspaceSetting', 'AutoProvisioningSetting', @@ -205,6 +218,9 @@ 'ConnectedResource', 'ConnectableResource', 'AllowedConnectionsResource', + 'RegulatoryComplianceStandardPaged', + 'RegulatoryComplianceControlPaged', + 'RegulatoryComplianceAssessmentPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', 'AutoProvisioningSettingPaged', @@ -220,6 +236,7 @@ 'ExternalSecuritySolutionPaged', 'TopologyResourcePaged', 'AllowedConnectionsResourcePaged', + 'State', 'PricingTier', 'AlertNotifications', 'AlertsToAdmins', diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py new file mode 100644 index 000000000000..471302606092 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = kwargs.get('state', None) + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py new file mode 100644 index 000000000000..f5661a66b539 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_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 RegulatoryComplianceAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py new file mode 100644 index 000000000000..92bad19c1805 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = state + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py new file mode 100644 index 000000000000..ab7accd57683 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = kwargs.get('state', None) + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py new file mode 100644 index 000000000000..22210d83bc43 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_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 RegulatoryComplianceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceControlPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py new file mode 100644 index 000000000000..0eaf9208895c --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = state + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py new file mode 100644 index 000000000000..052a8a90edbc --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py new file mode 100644 index 000000000000..8f091eee07be --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_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 RegulatoryComplianceStandardPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceStandard ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceStandard]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceStandardPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py new file mode 100644 index 000000000000..9abfdccc46f2 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = state + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 6c105302e027..8046a2722120 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -12,6 +12,14 @@ from enum import Enum +class State(str, Enum): + + passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state + failed = "Failed" #: At least one supported regulatory compliance control in the given standard has a state of failed + skipped = "Skipped" #: All supported regulatory compliance controls in the given standard have a state of skipped + unsupported = "Unsupported" #: No supported regulatory compliance data for the given standard + + class PricingTier(str, Enum): free = "Free" #: Get free Azure security center experience with basic security features diff --git a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index cc451ba3dd54..af7616dd9e3c 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -9,6 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +from .regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations +from .regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations +from .regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations from .pricings_operations import PricingsOperations from .security_contacts_operations import SecurityContactsOperations from .workspace_settings_operations import WorkspaceSettingsOperations @@ -28,6 +31,9 @@ from .allowed_connections_operations import AllowedConnectionsOperations __all__ = [ + 'RegulatoryComplianceStandardsOperations', + 'RegulatoryComplianceControlsOperations', + 'RegulatoryComplianceAssessmentsOperations', 'PricingsOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', diff --git a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py new file mode 100644 index 000000000000..afc2c6d0adfd --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py @@ -0,0 +1,193 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceAssessmentsOperations(object): + """RegulatoryComplianceAssessmentsOperations 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: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, regulatory_compliance_standard_name, regulatory_compliance_control_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Details and state of assessments mapped to selected regulatory + compliance control. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param filter: OData filter. Optional. + :type filter: 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 RegulatoryComplianceAssessment + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceAssessmentPaged[~azure.mgmt.security.models.RegulatoryComplianceAssessment] + :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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments'} + + def get( + self, resource_group_name, regulatory_compliance_standard_name, regulatory_compliance_control_name, regulatory_compliance_assessment_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details and state for selected + assessment. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param regulatory_compliance_assessment_name: Name of the regulatory + compliance assessment object + :type regulatory_compliance_assessment_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: RegulatoryComplianceAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str'), + 'regulatoryComplianceAssessmentName': self._serialize.url("regulatory_compliance_assessment_name", regulatory_compliance_assessment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py new file mode 100644 index 000000000000..9b5db20ec2eb --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py @@ -0,0 +1,183 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceControlsOperations(object): + """RegulatoryComplianceControlsOperations 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: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, regulatory_compliance_standard_name, filter=None, custom_headers=None, raw=False, **operation_config): + """All supported regulatory compliance controls details and state for + selected standard. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param filter: OData filter. Optional. + :type filter: 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 RegulatoryComplianceControl + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceControlPaged[~azure.mgmt.security.models.RegulatoryComplianceControl] + :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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls'} + + def get( + self, resource_group_name, regulatory_compliance_standard_name, regulatory_compliance_control_name, custom_headers=None, raw=False, **operation_config): + """Selected regulatory compliance control details and state. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_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: RegulatoryComplianceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py new file mode 100644 index 000000000000..43a9ce7a73ce --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py @@ -0,0 +1,174 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceStandardsOperations(object): + """RegulatoryComplianceStandardsOperations 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: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance standards details and state. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: OData filter. Optional. + :type filter: 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 RegulatoryComplianceStandard + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceStandardPaged[~azure.mgmt.security.models.RegulatoryComplianceStandard] + :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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards'} + + def get( + self, resource_group_name, regulatory_compliance_standard_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details state for selected standard. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_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: RegulatoryComplianceStandard or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceStandard or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceStandard', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/security_center.py b/azure-mgmt-security/azure/mgmt/security/security_center.py index 4a70b5762f4f..01022663ecc1 100644 --- a/azure-mgmt-security/azure/mgmt/security/security_center.py +++ b/azure-mgmt-security/azure/mgmt/security/security_center.py @@ -13,6 +13,9 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations +from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations +from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations from .operations.pricings_operations import PricingsOperations from .operations.security_contacts_operations import SecurityContactsOperations from .operations.workspace_settings_operations import WorkspaceSettingsOperations @@ -77,6 +80,12 @@ class SecurityCenter(SDKClient): :ivar config: Configuration for client. :vartype config: SecurityCenterConfiguration + :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations + :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations + :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations + :vartype regulatory_compliance_controls: azure.mgmt.security.operations.RegulatoryComplianceControlsOperations + :ivar regulatory_compliance_assessments: RegulatoryComplianceAssessments operations + :vartype regulatory_compliance_assessments: azure.mgmt.security.operations.RegulatoryComplianceAssessmentsOperations :ivar pricings: Pricings operations :vartype pricings: azure.mgmt.security.operations.PricingsOperations :ivar security_contacts: SecurityContacts operations @@ -133,6 +142,12 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_assessments = RegulatoryComplianceAssessmentsOperations( + self._client, self.config, self._serialize, self._deserialize) self.pricings = PricingsOperations( self._client, self.config, self._serialize, self._deserialize) self.security_contacts = SecurityContactsOperations( From b19e1bc119e8a930624891963e70a37b8859ea26 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 25 Mar 2019 09:48:31 -0700 Subject: [PATCH 14/17] [AutoPR security/resource-manager] Security: 2017-08-01-preview - Introduce IoT security groups resource (#4112) * Generated from c55343d67df9f202ebbfdc2670f167350fe265ea Some fixes after validation * Generated from d6824620292538df997c2da42c9deda14ee9a90f Change resource name, add x-ms-pagable * Generated from 0cfbd83907e23a9364669f804e9442d771ad088b Sync with master (split files by resource type), add value type * Packaging update of azure-mgmt-security * Generated from 45af2dd2143cc9b695ea876a68496401cb37acb9 Fix readme file * Generated from 67d905e193967e7a8c35511c87239b4f052314a1 delete unreferenced example file --- .../azure/mgmt/security/models/__init__.py | 25 ++ .../models/allowlist_custom_alert_rule.py | 60 ++++ .../models/allowlist_custom_alert_rule_py3.py | 60 ++++ .../mgmt/security/models/custom_alert_rule.py | 52 ++++ .../security/models/custom_alert_rule_py3.py | 52 ++++ .../models/denylist_custom_alert_rule.py | 60 ++++ .../models/denylist_custom_alert_rule_py3.py | 60 ++++ .../security/models/device_security_group.py | 62 ++++ .../models/device_security_group_paged.py | 27 ++ .../models/device_security_group_py3.py | 62 ++++ .../security/models/list_custom_alert_rule.py | 54 ++++ .../models/list_custom_alert_rule_py3.py | 54 ++++ .../security/models/security_center_enums.py | 6 + .../models/threshold_custom_alert_rule.py | 59 ++++ .../models/threshold_custom_alert_rule_py3.py | 59 ++++ .../models/time_window_custom_alert_rule.py | 68 ++++ .../time_window_custom_alert_rule_py3.py | 68 ++++ .../mgmt/security/operations/__init__.py | 2 + .../device_security_groups_operations.py | 292 ++++++++++++++++++ .../azure/mgmt/security/security_center.py | 5 + 20 files changed, 1187 insertions(+) create mode 100644 azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/device_security_group.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/device_security_group_paged.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py create mode 100644 azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py create mode 100644 azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index fbde841263d3..2134e4db7dd1 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -23,6 +23,13 @@ from .compliance_segment_py3 import ComplianceSegment from .compliance_py3 import Compliance from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting + from .threshold_custom_alert_rule_py3 import ThresholdCustomAlertRule + from .time_window_custom_alert_rule_py3 import TimeWindowCustomAlertRule + from .allowlist_custom_alert_rule_py3 import AllowlistCustomAlertRule + from .denylist_custom_alert_rule_py3 import DenylistCustomAlertRule + from .device_security_group_py3 import DeviceSecurityGroup + from .custom_alert_rule_py3 import CustomAlertRule + from .list_custom_alert_rule_py3 import ListCustomAlertRule from .setting_py3 import Setting from .data_export_setting_py3 import DataExportSetting from .setting_resource_py3 import SettingResource @@ -81,6 +88,13 @@ from .compliance_segment import ComplianceSegment from .compliance import Compliance from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting + from .threshold_custom_alert_rule import ThresholdCustomAlertRule + from .time_window_custom_alert_rule import TimeWindowCustomAlertRule + from .allowlist_custom_alert_rule import AllowlistCustomAlertRule + from .denylist_custom_alert_rule import DenylistCustomAlertRule + from .device_security_group import DeviceSecurityGroup + from .custom_alert_rule import CustomAlertRule + from .list_custom_alert_rule import ListCustomAlertRule from .setting import Setting from .data_export_setting import DataExportSetting from .setting_resource import SettingResource @@ -132,6 +146,7 @@ from .workspace_setting_paged import WorkspaceSettingPaged from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged from .compliance_paged import CompliancePaged +from .device_security_group_paged import DeviceSecurityGroupPaged from .setting_paged import SettingPaged from .information_protection_policy_paged import InformationProtectionPolicyPaged from .operation_paged import OperationPaged @@ -149,6 +164,7 @@ AlertNotifications, AlertsToAdmins, AutoProvision, + ValueType, SettingKind, ReportedSeverity, SecurityFamily, @@ -174,6 +190,13 @@ 'ComplianceSegment', 'Compliance', 'AdvancedThreatProtectionSetting', + 'ThresholdCustomAlertRule', + 'TimeWindowCustomAlertRule', + 'AllowlistCustomAlertRule', + 'DenylistCustomAlertRule', + 'DeviceSecurityGroup', + 'CustomAlertRule', + 'ListCustomAlertRule', 'Setting', 'DataExportSetting', 'SettingResource', @@ -225,6 +248,7 @@ 'WorkspaceSettingPaged', 'AutoProvisioningSettingPaged', 'CompliancePaged', + 'DeviceSecurityGroupPaged', 'SettingPaged', 'InformationProtectionPolicyPaged', 'OperationPaged', @@ -241,6 +265,7 @@ 'AlertNotifications', 'AlertsToAdmins', 'AutoProvision', + 'ValueType', 'SettingKind', 'ReportedSeverity', 'SecurityFamily', diff --git a/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py new file mode 100644 index 000000000000..58275b4e2fbb --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py @@ -0,0 +1,60 @@ +# 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 .list_custom_alert_rule import ListCustomAlertRule + + +class AllowlistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is allowed. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param allowlist_values: Required. The values to allow. The format of the + values depends on the rule type. + :type allowlist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'allowlist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AllowlistCustomAlertRule, self).__init__(**kwargs) + self.allowlist_values = kwargs.get('allowlist_values', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py new file mode 100644 index 000000000000..7f8772c3dbbd --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py @@ -0,0 +1,60 @@ +# 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 .list_custom_alert_rule_py3 import ListCustomAlertRule + + +class AllowlistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is allowed. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param allowlist_values: Required. The values to allow. The format of the + values depends on the rule type. + :type allowlist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'allowlist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, allowlist_values, **kwargs) -> None: + super(AllowlistCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.allowlist_values = allowlist_values diff --git a/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py new file mode 100644 index 000000000000..7b8bbed4659f --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py @@ -0,0 +1,52 @@ +# 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 CustomAlertRule(Model): + """A custom alert rule. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomAlertRule, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.is_enabled = kwargs.get('is_enabled', None) + self.rule_type = kwargs.get('rule_type', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py new file mode 100644 index 000000000000..8ecf4bf163cb --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py @@ -0,0 +1,52 @@ +# 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 CustomAlertRule(Model): + """A custom alert rule. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, **kwargs) -> None: + super(CustomAlertRule, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.is_enabled = is_enabled + self.rule_type = rule_type diff --git a/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py new file mode 100644 index 000000000000..976650ae94b9 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py @@ -0,0 +1,60 @@ +# 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 .list_custom_alert_rule import ListCustomAlertRule + + +class DenylistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is denied. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param denylist_values: Required. The values to deny. The format of the + values depends on the rule type. + :type denylist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'denylist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'denylist_values': {'key': 'denylistValues', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DenylistCustomAlertRule, self).__init__(**kwargs) + self.denylist_values = kwargs.get('denylist_values', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py new file mode 100644 index 000000000000..9813e72eea68 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py @@ -0,0 +1,60 @@ +# 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 .list_custom_alert_rule_py3 import ListCustomAlertRule + + +class DenylistCustomAlertRule(ListCustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is denied. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + :param denylist_values: Required. The values to deny. The format of the + values depends on the rule type. + :type denylist_values: list[str] + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + 'denylist_values': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'denylist_values': {'key': 'denylistValues', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, denylist_values, **kwargs) -> None: + super(DenylistCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.denylist_values = denylist_values diff --git a/azure-mgmt-security/azure/mgmt/security/models/device_security_group.py b/azure-mgmt-security/azure/mgmt/security/models/device_security_group.py new file mode 100644 index 000000000000..a213758a98c6 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/device_security_group.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DeviceSecurityGroup(Resource): + """The device security group resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param threshold_rules: A list of threshold custom alert rules. + :type threshold_rules: + list[~azure.mgmt.security.models.ThresholdCustomAlertRule] + :param time_window_rules: A list of time window custom alert rules. + :type time_window_rules: + list[~azure.mgmt.security.models.TimeWindowCustomAlertRule] + :param allowlist_rules: A list of allow-list custom alert rules. + :type allowlist_rules: + list[~azure.mgmt.security.models.AllowlistCustomAlertRule] + :param denylist_rules: A list of deny-list custom alert rules. + :type denylist_rules: + list[~azure.mgmt.security.models.DenylistCustomAlertRule] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'threshold_rules': {'key': 'properties.thresholdRules', 'type': '[ThresholdCustomAlertRule]'}, + 'time_window_rules': {'key': 'properties.timeWindowRules', 'type': '[TimeWindowCustomAlertRule]'}, + 'allowlist_rules': {'key': 'properties.allowlistRules', 'type': '[AllowlistCustomAlertRule]'}, + 'denylist_rules': {'key': 'properties.denylistRules', 'type': '[DenylistCustomAlertRule]'}, + } + + def __init__(self, **kwargs): + super(DeviceSecurityGroup, self).__init__(**kwargs) + self.threshold_rules = kwargs.get('threshold_rules', None) + self.time_window_rules = kwargs.get('time_window_rules', None) + self.allowlist_rules = kwargs.get('allowlist_rules', None) + self.denylist_rules = kwargs.get('denylist_rules', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/device_security_group_paged.py b/azure-mgmt-security/azure/mgmt/security/models/device_security_group_paged.py new file mode 100644 index 000000000000..cf7fcb32eed7 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/device_security_group_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 DeviceSecurityGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`DeviceSecurityGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeviceSecurityGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(DeviceSecurityGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py b/azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py new file mode 100644 index 000000000000..9e2a2015d800 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class DeviceSecurityGroup(Resource): + """The device security group resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param threshold_rules: A list of threshold custom alert rules. + :type threshold_rules: + list[~azure.mgmt.security.models.ThresholdCustomAlertRule] + :param time_window_rules: A list of time window custom alert rules. + :type time_window_rules: + list[~azure.mgmt.security.models.TimeWindowCustomAlertRule] + :param allowlist_rules: A list of allow-list custom alert rules. + :type allowlist_rules: + list[~azure.mgmt.security.models.AllowlistCustomAlertRule] + :param denylist_rules: A list of deny-list custom alert rules. + :type denylist_rules: + list[~azure.mgmt.security.models.DenylistCustomAlertRule] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'threshold_rules': {'key': 'properties.thresholdRules', 'type': '[ThresholdCustomAlertRule]'}, + 'time_window_rules': {'key': 'properties.timeWindowRules', 'type': '[TimeWindowCustomAlertRule]'}, + 'allowlist_rules': {'key': 'properties.allowlistRules', 'type': '[AllowlistCustomAlertRule]'}, + 'denylist_rules': {'key': 'properties.denylistRules', 'type': '[DenylistCustomAlertRule]'}, + } + + def __init__(self, *, threshold_rules=None, time_window_rules=None, allowlist_rules=None, denylist_rules=None, **kwargs) -> None: + super(DeviceSecurityGroup, self).__init__(**kwargs) + self.threshold_rules = threshold_rules + self.time_window_rules = time_window_rules + self.allowlist_rules = allowlist_rules + self.denylist_rules = denylist_rules diff --git a/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py new file mode 100644 index 000000000000..83ac0df72267 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py @@ -0,0 +1,54 @@ +# 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 .custom_alert_rule import CustomAlertRule + + +class ListCustomAlertRule(CustomAlertRule): + """A List custom alert rule. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListCustomAlertRule, self).__init__(**kwargs) + self.value_type = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py new file mode 100644 index 000000000000..ae713623de5f --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py @@ -0,0 +1,54 @@ +# 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 .custom_alert_rule_py3 import CustomAlertRule + + +class ListCustomAlertRule(CustomAlertRule): + """A List custom alert rule. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :ivar value_type: The value type of the items in the list. Possible values + include: 'IpCidr', 'String' + :vartype value_type: str or ~azure.mgmt.security.models.ValueType + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'value_type': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, **kwargs) -> None: + super(ListCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.value_type = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 8046a2722120..39b8772f9c3a 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -44,6 +44,12 @@ class AutoProvision(str, Enum): off = "Off" #: Do not install security agent on the VMs automatically +class ValueType(str, Enum): + + ip_cidr = "IpCidr" #: An IP range in CIDR format (e.g. '192.168.0.1/8'). + string = "String" #: Any string value. + + class SettingKind(str, Enum): data_export_setting = "DataExportSetting" diff --git a/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.py new file mode 100644 index 000000000000..4e6306190e2b --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.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 .custom_alert_rule import CustomAlertRule + + +class ThresholdCustomAlertRule(CustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is within the given range. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ThresholdCustomAlertRule, self).__init__(**kwargs) + self.min_threshold = kwargs.get('min_threshold', None) + self.max_threshold = kwargs.get('max_threshold', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_py3.py new file mode 100644 index 000000000000..63c5567caceb --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_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 .custom_alert_rule_py3 import CustomAlertRule + + +class ThresholdCustomAlertRule(CustomAlertRule): + """A custom alert rule that checks if a value (depends on the custom alert + type) is within the given range. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, min_threshold: int, max_threshold: int, **kwargs) -> None: + super(ThresholdCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) + self.min_threshold = min_threshold + self.max_threshold = max_threshold diff --git a/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py new file mode 100644 index 000000000000..224d5a3dc0ea --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py @@ -0,0 +1,68 @@ +# 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 TimeWindowCustomAlertRule(Model): + """A custom alert rule that checks if the number of activities (depends on the + custom alert type) in a time window is within the given range. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + :param time_window_size: Required. The time window size in iso8601 format. + :type time_window_size: timedelta + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + 'time_window_size': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(TimeWindowCustomAlertRule, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.is_enabled = kwargs.get('is_enabled', None) + self.rule_type = kwargs.get('rule_type', None) + self.min_threshold = kwargs.get('min_threshold', None) + self.max_threshold = kwargs.get('max_threshold', None) + self.time_window_size = kwargs.get('time_window_size', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py new file mode 100644 index 000000000000..0a2962dddb94 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py @@ -0,0 +1,68 @@ +# 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 TimeWindowCustomAlertRule(Model): + """A custom alert rule that checks if the number of activities (depends on the + custom alert type) in a time window is within the given range. + + 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 display_name: The display name of the custom alert. + :vartype display_name: str + :ivar description: The description of the custom alert. + :vartype description: str + :param is_enabled: Required. Whether the custom alert is enabled. + :type is_enabled: bool + :param rule_type: Required. The type of the custom alert rule. + :type rule_type: str + :param min_threshold: Required. The minimum threshold. + :type min_threshold: int + :param max_threshold: Required. The maximum threshold. + :type max_threshold: int + :param time_window_size: Required. The time window size in iso8601 format. + :type time_window_size: timedelta + """ + + _validation = { + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'is_enabled': {'required': True}, + 'rule_type': {'required': True}, + 'min_threshold': {'required': True}, + 'max_threshold': {'required': True}, + 'time_window_size': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, + 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, + 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, + } + + def __init__(self, *, is_enabled: bool, rule_type: str, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: + super(TimeWindowCustomAlertRule, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.is_enabled = is_enabled + self.rule_type = rule_type + self.min_threshold = min_threshold + self.max_threshold = max_threshold + self.time_window_size = time_window_size diff --git a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index af7616dd9e3c..d16a4df3422e 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -18,6 +18,7 @@ from .auto_provisioning_settings_operations import AutoProvisioningSettingsOperations from .compliances_operations import CompliancesOperations from .advanced_threat_protection_operations import AdvancedThreatProtectionOperations +from .device_security_groups_operations import DeviceSecurityGroupsOperations from .settings_operations import SettingsOperations from .information_protection_policies_operations import InformationProtectionPoliciesOperations from .operations import Operations @@ -40,6 +41,7 @@ 'AutoProvisioningSettingsOperations', 'CompliancesOperations', 'AdvancedThreatProtectionOperations', + 'DeviceSecurityGroupsOperations', 'SettingsOperations', 'InformationProtectionPoliciesOperations', 'Operations', diff --git a/azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py new file mode 100644 index 000000000000..a55f1ed2f3c9 --- /dev/null +++ b/azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py @@ -0,0 +1,292 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DeviceSecurityGroupsOperations(object): + """DeviceSecurityGroupsOperations 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: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_id, custom_headers=None, raw=False, **operation_config): + """Gets the list of device security groups for the specified IoT hub + resource. + + :param resource_id: The identifier of the resource. + :type resource_id: 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 DeviceSecurityGroup + :rtype: + ~azure.mgmt.security.models.DeviceSecurityGroupPaged[~azure.mgmt.security.models.DeviceSecurityGroup] + :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 = { + 'resourceId': self._serialize.url("resource_id", resource_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['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DeviceSecurityGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DeviceSecurityGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups'} + + def get( + self, resource_id, device_security_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the device security group for the specified IoT hub resource. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param device_security_group_name: The name of the security group. + Please notice that the name is case insensitive. + :type device_security_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeviceSecurityGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.DeviceSecurityGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DeviceSecurityGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} + + def create_or_update( + self, resource_id, device_security_group_name, device_security_group, custom_headers=None, raw=False, **operation_config): + """Creates or updates the device security group on a specified IoT hub + resource. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param device_security_group_name: The name of the security group. + Please notice that the name is case insensitive. + :type device_security_group_name: str + :param device_security_group: Security group object. + :type device_security_group: + ~azure.mgmt.security.models.DeviceSecurityGroup + :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: DeviceSecurityGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.DeviceSecurityGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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(device_security_group, 'DeviceSecurityGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, 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('DeviceSecurityGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('DeviceSecurityGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} + + def delete( + self, resource_id, device_security_group_name, custom_headers=None, raw=False, **operation_config): + """Deletes the security group. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param device_security_group_name: The name of the security group. + Please notice that the name is case insensitive. + :type device_security_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/security_center.py b/azure-mgmt-security/azure/mgmt/security/security_center.py index 01022663ecc1..43de544dc1eb 100644 --- a/azure-mgmt-security/azure/mgmt/security/security_center.py +++ b/azure-mgmt-security/azure/mgmt/security/security_center.py @@ -22,6 +22,7 @@ from .operations.auto_provisioning_settings_operations import AutoProvisioningSettingsOperations from .operations.compliances_operations import CompliancesOperations from .operations.advanced_threat_protection_operations import AdvancedThreatProtectionOperations +from .operations.device_security_groups_operations import DeviceSecurityGroupsOperations from .operations.settings_operations import SettingsOperations from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations from .operations.operations import Operations @@ -98,6 +99,8 @@ class SecurityCenter(SDKClient): :vartype compliances: azure.mgmt.security.operations.CompliancesOperations :ivar advanced_threat_protection: AdvancedThreatProtection operations :vartype advanced_threat_protection: azure.mgmt.security.operations.AdvancedThreatProtectionOperations + :ivar device_security_groups: DeviceSecurityGroups operations + :vartype device_security_groups: azure.mgmt.security.operations.DeviceSecurityGroupsOperations :ivar settings: Settings operations :vartype settings: azure.mgmt.security.operations.SettingsOperations :ivar information_protection_policies: InformationProtectionPolicies operations @@ -160,6 +163,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.advanced_threat_protection = AdvancedThreatProtectionOperations( self._client, self.config, self._serialize, self._deserialize) + self.device_security_groups = DeviceSecurityGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) self.settings = SettingsOperations( self._client, self.config, self._serialize, self._deserialize) self.information_protection_policies = InformationProtectionPoliciesOperations( From c61fef8e10ac07e6b393ddd42e927f81e473df87 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sat, 6 Apr 2019 07:59:12 -0700 Subject: [PATCH 15/17] Generated from 35998a721ea3c6fbae6d5b40f051a3d0a8144ea9 (#4756) Changing new version Settings file --- .../azure/mgmt/security/models/__init__.py | 308 ++++++++---------- .../models/allowlist_custom_alert_rule.py | 60 ---- .../models/allowlist_custom_alert_rule_py3.py | 60 ---- .../mgmt/security/models/custom_alert_rule.py | 52 --- .../security/models/custom_alert_rule_py3.py | 52 --- .../models/denylist_custom_alert_rule.py | 60 ---- .../models/denylist_custom_alert_rule_py3.py | 60 ---- .../security/models/device_security_group.py | 62 ---- .../models/device_security_group_paged.py | 27 -- .../models/device_security_group_py3.py | 62 ---- .../security/models/list_custom_alert_rule.py | 54 --- .../models/list_custom_alert_rule_py3.py | 54 --- .../regulatory_compliance_assessment.py | 89 ----- .../regulatory_compliance_assessment_paged.py | 27 -- .../regulatory_compliance_assessment_py3.py | 89 ----- .../models/regulatory_compliance_control.py | 71 ---- .../regulatory_compliance_control_paged.py | 27 -- .../regulatory_compliance_control_py3.py | 71 ---- .../models/regulatory_compliance_standard.py | 72 ---- .../regulatory_compliance_standard_paged.py | 27 -- .../regulatory_compliance_standard_py3.py | 72 ---- .../security/models/security_center_enums.py | 76 ++--- .../models/threshold_custom_alert_rule.py | 59 ---- .../models/threshold_custom_alert_rule_py3.py | 59 ---- .../models/time_window_custom_alert_rule.py | 68 ---- .../time_window_custom_alert_rule_py3.py | 68 ---- .../mgmt/security/operations/__init__.py | 56 ++-- .../device_security_groups_operations.py | 292 ----------------- ...atory_compliance_assessments_operations.py | 193 ----------- ...gulatory_compliance_controls_operations.py | 183 ----------- ...ulatory_compliance_standards_operations.py | 174 ---------- .../operations/settings_operations.py | 4 +- .../azure/mgmt/security/security_center.py | 122 +++---- 33 files changed, 241 insertions(+), 2569 deletions(-) delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/device_security_group.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/device_security_group_paged.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py delete mode 100644 azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py diff --git a/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 2134e4db7dd1..791f6ade36e2 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -10,52 +10,21 @@ # -------------------------------------------------------------------------- try: - from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard - from .regulatory_compliance_control_py3 import RegulatoryComplianceControl - from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment - from .asc_location_py3 import AscLocation - from .resource_py3 import Resource from .pricing_py3 import Pricing from .pricing_list_py3 import PricingList - from .security_contact_py3 import SecurityContact - from .workspace_setting_py3 import WorkspaceSetting - from .auto_provisioning_setting_py3 import AutoProvisioningSetting - from .compliance_segment_py3 import ComplianceSegment - from .compliance_py3 import Compliance - from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting - from .threshold_custom_alert_rule_py3 import ThresholdCustomAlertRule - from .time_window_custom_alert_rule_py3 import TimeWindowCustomAlertRule - from .allowlist_custom_alert_rule_py3 import AllowlistCustomAlertRule - from .denylist_custom_alert_rule_py3 import DenylistCustomAlertRule - from .device_security_group_py3 import DeviceSecurityGroup - from .custom_alert_rule_py3 import CustomAlertRule - from .list_custom_alert_rule_py3 import ListCustomAlertRule - from .setting_py3 import Setting - from .data_export_setting_py3 import DataExportSetting - from .setting_resource_py3 import SettingResource - from .sensitivity_label_py3 import SensitivityLabel - from .information_protection_keyword_py3 import InformationProtectionKeyword - from .information_type_py3 import InformationType - from .information_protection_policy_py3 import InformationProtectionPolicy - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .security_task_parameters_py3 import SecurityTaskParameters - from .security_task_py3 import SecurityTask + from .asc_location_py3 import AscLocation + from .resource_py3 import Resource from .alert_entity_py3 import AlertEntity from .alert_confidence_reason_py3 import AlertConfidenceReason from .alert_py3 import Alert - from .discovered_security_solution_py3 import DiscoveredSecuritySolution + from .setting_py3 import Setting + from .data_export_setting_py3 import DataExportSetting + from .setting_resource_py3 import SettingResource + from .connected_resource_py3 import ConnectedResource + from .connectable_resource_py3 import ConnectableResource + from .allowed_connections_resource_py3 import AllowedConnectionsResource from .location_py3 import Location - from .jit_network_access_port_rule_py3 import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine_py3 import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port_py3 import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine_py3 import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request_py3 import JitNetworkAccessRequest - from .jit_network_access_policy_py3 import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port_py3 import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine_py3 import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request_py3 import JitNetworkAccessPolicyInitiateRequest - from .kind_py3 import Kind + from .discovered_security_solution_py3 import DiscoveredSecuritySolution from .external_security_solution_py3 import ExternalSecuritySolution from .cef_solution_properties_py3 import CefSolutionProperties from .cef_external_security_solution_py3 import CefExternalSecuritySolution @@ -67,60 +36,50 @@ from .external_security_solution_kind1_py3 import ExternalSecuritySolutionKind1 from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties from .aad_connectivity_state1_py3 import AadConnectivityState1 + from .jit_network_access_port_rule_py3 import JitNetworkAccessPortRule + from .jit_network_access_policy_virtual_machine_py3 import JitNetworkAccessPolicyVirtualMachine + from .jit_network_access_request_port_py3 import JitNetworkAccessRequestPort + from .jit_network_access_request_virtual_machine_py3 import JitNetworkAccessRequestVirtualMachine + from .jit_network_access_request_py3 import JitNetworkAccessRequest + from .jit_network_access_policy_py3 import JitNetworkAccessPolicy + from .jit_network_access_policy_initiate_port_py3 import JitNetworkAccessPolicyInitiatePort + from .jit_network_access_policy_initiate_virtual_machine_py3 import JitNetworkAccessPolicyInitiateVirtualMachine + from .jit_network_access_policy_initiate_request_py3 import JitNetworkAccessPolicyInitiateRequest + from .kind_py3 import Kind + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .security_task_parameters_py3 import SecurityTaskParameters + from .security_task_py3 import SecurityTask from .topology_single_resource_parent_py3 import TopologySingleResourceParent from .topology_single_resource_child_py3 import TopologySingleResourceChild from .topology_single_resource_py3 import TopologySingleResource from .topology_resource_py3 import TopologyResource - from .connected_resource_py3 import ConnectedResource - from .connectable_resource_py3 import ConnectableResource - from .allowed_connections_resource_py3 import AllowedConnectionsResource + from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting + from .auto_provisioning_setting_py3 import AutoProvisioningSetting + from .compliance_segment_py3 import ComplianceSegment + from .compliance_py3 import Compliance + from .sensitivity_label_py3 import SensitivityLabel + from .information_protection_keyword_py3 import InformationProtectionKeyword + from .information_type_py3 import InformationType + from .information_protection_policy_py3 import InformationProtectionPolicy + from .security_contact_py3 import SecurityContact + from .workspace_setting_py3 import WorkspaceSetting except (SyntaxError, ImportError): - from .regulatory_compliance_standard import RegulatoryComplianceStandard - from .regulatory_compliance_control import RegulatoryComplianceControl - from .regulatory_compliance_assessment import RegulatoryComplianceAssessment - from .asc_location import AscLocation - from .resource import Resource from .pricing import Pricing from .pricing_list import PricingList - from .security_contact import SecurityContact - from .workspace_setting import WorkspaceSetting - from .auto_provisioning_setting import AutoProvisioningSetting - from .compliance_segment import ComplianceSegment - from .compliance import Compliance - from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting - from .threshold_custom_alert_rule import ThresholdCustomAlertRule - from .time_window_custom_alert_rule import TimeWindowCustomAlertRule - from .allowlist_custom_alert_rule import AllowlistCustomAlertRule - from .denylist_custom_alert_rule import DenylistCustomAlertRule - from .device_security_group import DeviceSecurityGroup - from .custom_alert_rule import CustomAlertRule - from .list_custom_alert_rule import ListCustomAlertRule - from .setting import Setting - from .data_export_setting import DataExportSetting - from .setting_resource import SettingResource - from .sensitivity_label import SensitivityLabel - from .information_protection_keyword import InformationProtectionKeyword - from .information_type import InformationType - from .information_protection_policy import InformationProtectionPolicy - from .operation_display import OperationDisplay - from .operation import Operation - from .security_task_parameters import SecurityTaskParameters - from .security_task import SecurityTask + from .asc_location import AscLocation + from .resource import Resource from .alert_entity import AlertEntity from .alert_confidence_reason import AlertConfidenceReason from .alert import Alert - from .discovered_security_solution import DiscoveredSecuritySolution + from .setting import Setting + from .data_export_setting import DataExportSetting + from .setting_resource import SettingResource + from .connected_resource import ConnectedResource + from .connectable_resource import ConnectableResource + from .allowed_connections_resource import AllowedConnectionsResource from .location import Location - from .jit_network_access_port_rule import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request import JitNetworkAccessRequest - from .jit_network_access_policy import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest - from .kind import Kind + from .discovered_security_solution import DiscoveredSecuritySolution from .external_security_solution import ExternalSecuritySolution from .cef_solution_properties import CefSolutionProperties from .cef_external_security_solution import CefExternalSecuritySolution @@ -132,97 +91,81 @@ from .external_security_solution_kind1 import ExternalSecuritySolutionKind1 from .external_security_solution_properties import ExternalSecuritySolutionProperties from .aad_connectivity_state1 import AadConnectivityState1 + from .jit_network_access_port_rule import JitNetworkAccessPortRule + from .jit_network_access_policy_virtual_machine import JitNetworkAccessPolicyVirtualMachine + from .jit_network_access_request_port import JitNetworkAccessRequestPort + from .jit_network_access_request_virtual_machine import JitNetworkAccessRequestVirtualMachine + from .jit_network_access_request import JitNetworkAccessRequest + from .jit_network_access_policy import JitNetworkAccessPolicy + from .jit_network_access_policy_initiate_port import JitNetworkAccessPolicyInitiatePort + from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine + from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest + from .kind import Kind + from .operation_display import OperationDisplay + from .operation import Operation + from .security_task_parameters import SecurityTaskParameters + from .security_task import SecurityTask from .topology_single_resource_parent import TopologySingleResourceParent from .topology_single_resource_child import TopologySingleResourceChild from .topology_single_resource import TopologySingleResource from .topology_resource import TopologyResource - from .connected_resource import ConnectedResource - from .connectable_resource import ConnectableResource - from .allowed_connections_resource import AllowedConnectionsResource -from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged -from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged -from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged -from .security_contact_paged import SecurityContactPaged -from .workspace_setting_paged import WorkspaceSettingPaged -from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged -from .compliance_paged import CompliancePaged -from .device_security_group_paged import DeviceSecurityGroupPaged -from .setting_paged import SettingPaged -from .information_protection_policy_paged import InformationProtectionPolicyPaged -from .operation_paged import OperationPaged -from .asc_location_paged import AscLocationPaged -from .security_task_paged import SecurityTaskPaged + from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting + from .auto_provisioning_setting import AutoProvisioningSetting + from .compliance_segment import ComplianceSegment + from .compliance import Compliance + from .sensitivity_label import SensitivityLabel + from .information_protection_keyword import InformationProtectionKeyword + from .information_type import InformationType + from .information_protection_policy import InformationProtectionPolicy + from .security_contact import SecurityContact + from .workspace_setting import WorkspaceSetting from .alert_paged import AlertPaged +from .setting_paged import SettingPaged +from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged from .discovered_security_solution_paged import DiscoveredSecuritySolutionPaged -from .jit_network_access_policy_paged import JitNetworkAccessPolicyPaged from .external_security_solution_paged import ExternalSecuritySolutionPaged +from .jit_network_access_policy_paged import JitNetworkAccessPolicyPaged +from .asc_location_paged import AscLocationPaged +from .operation_paged import OperationPaged +from .security_task_paged import SecurityTaskPaged from .topology_resource_paged import TopologyResourcePaged -from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged +from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged +from .compliance_paged import CompliancePaged +from .information_protection_policy_paged import InformationProtectionPolicyPaged +from .security_contact_paged import SecurityContactPaged +from .workspace_setting_paged import WorkspaceSettingPaged from .security_center_enums import ( - State, PricingTier, - AlertNotifications, - AlertsToAdmins, - AutoProvision, - ValueType, - SettingKind, ReportedSeverity, + SettingKind, SecurityFamily, + AadConnectivityState, + ExternalSecuritySolutionKind, Protocol, Status, StatusReason, - AadConnectivityState, - ExternalSecuritySolutionKind, + AutoProvision, + AlertNotifications, + AlertsToAdmins, ConnectionType, ) __all__ = [ - 'RegulatoryComplianceStandard', - 'RegulatoryComplianceControl', - 'RegulatoryComplianceAssessment', - 'AscLocation', - 'Resource', 'Pricing', 'PricingList', - 'SecurityContact', - 'WorkspaceSetting', - 'AutoProvisioningSetting', - 'ComplianceSegment', - 'Compliance', - 'AdvancedThreatProtectionSetting', - 'ThresholdCustomAlertRule', - 'TimeWindowCustomAlertRule', - 'AllowlistCustomAlertRule', - 'DenylistCustomAlertRule', - 'DeviceSecurityGroup', - 'CustomAlertRule', - 'ListCustomAlertRule', - 'Setting', - 'DataExportSetting', - 'SettingResource', - 'SensitivityLabel', - 'InformationProtectionKeyword', - 'InformationType', - 'InformationProtectionPolicy', - 'OperationDisplay', - 'Operation', - 'SecurityTaskParameters', - 'SecurityTask', + 'AscLocation', + 'Resource', 'AlertEntity', 'AlertConfidenceReason', 'Alert', - 'DiscoveredSecuritySolution', + 'Setting', + 'DataExportSetting', + 'SettingResource', + 'ConnectedResource', + 'ConnectableResource', + 'AllowedConnectionsResource', 'Location', - 'JitNetworkAccessPortRule', - 'JitNetworkAccessPolicyVirtualMachine', - 'JitNetworkAccessRequestPort', - 'JitNetworkAccessRequestVirtualMachine', - 'JitNetworkAccessRequest', - 'JitNetworkAccessPolicy', - 'JitNetworkAccessPolicyInitiatePort', - 'JitNetworkAccessPolicyInitiateVirtualMachine', - 'JitNetworkAccessPolicyInitiateRequest', - 'Kind', + 'DiscoveredSecuritySolution', 'ExternalSecuritySolution', 'CefSolutionProperties', 'CefExternalSecuritySolution', @@ -234,45 +177,60 @@ 'ExternalSecuritySolutionKind1', 'ExternalSecuritySolutionProperties', 'AadConnectivityState1', + 'JitNetworkAccessPortRule', + 'JitNetworkAccessPolicyVirtualMachine', + 'JitNetworkAccessRequestPort', + 'JitNetworkAccessRequestVirtualMachine', + 'JitNetworkAccessRequest', + 'JitNetworkAccessPolicy', + 'JitNetworkAccessPolicyInitiatePort', + 'JitNetworkAccessPolicyInitiateVirtualMachine', + 'JitNetworkAccessPolicyInitiateRequest', + 'Kind', + 'OperationDisplay', + 'Operation', + 'SecurityTaskParameters', + 'SecurityTask', 'TopologySingleResourceParent', 'TopologySingleResourceChild', 'TopologySingleResource', 'TopologyResource', - 'ConnectedResource', - 'ConnectableResource', - 'AllowedConnectionsResource', - 'RegulatoryComplianceStandardPaged', - 'RegulatoryComplianceControlPaged', - 'RegulatoryComplianceAssessmentPaged', - 'SecurityContactPaged', - 'WorkspaceSettingPaged', - 'AutoProvisioningSettingPaged', - 'CompliancePaged', - 'DeviceSecurityGroupPaged', - 'SettingPaged', - 'InformationProtectionPolicyPaged', - 'OperationPaged', - 'AscLocationPaged', - 'SecurityTaskPaged', + 'AdvancedThreatProtectionSetting', + 'AutoProvisioningSetting', + 'ComplianceSegment', + 'Compliance', + 'SensitivityLabel', + 'InformationProtectionKeyword', + 'InformationType', + 'InformationProtectionPolicy', + 'SecurityContact', + 'WorkspaceSetting', 'AlertPaged', + 'SettingPaged', + 'AllowedConnectionsResourcePaged', 'DiscoveredSecuritySolutionPaged', - 'JitNetworkAccessPolicyPaged', 'ExternalSecuritySolutionPaged', + 'JitNetworkAccessPolicyPaged', + 'AscLocationPaged', + 'OperationPaged', + 'SecurityTaskPaged', 'TopologyResourcePaged', - 'AllowedConnectionsResourcePaged', - 'State', + 'AutoProvisioningSettingPaged', + 'CompliancePaged', + 'InformationProtectionPolicyPaged', + 'SecurityContactPaged', + 'WorkspaceSettingPaged', 'PricingTier', - 'AlertNotifications', - 'AlertsToAdmins', - 'AutoProvision', - 'ValueType', - 'SettingKind', 'ReportedSeverity', + 'SettingKind', 'SecurityFamily', + 'AadConnectivityState', + 'ExternalSecuritySolutionKind', 'Protocol', 'Status', 'StatusReason', - 'AadConnectivityState', - 'ExternalSecuritySolutionKind', + 'AutoProvision', + 'AlertNotifications', + 'AlertsToAdmins', 'ConnectionType', ] diff --git a/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py deleted file mode 100644 index 58275b4e2fbb..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .list_custom_alert_rule import ListCustomAlertRule - - -class AllowlistCustomAlertRule(ListCustomAlertRule): - """A custom alert rule that checks if a value (depends on the custom alert - type) is allowed. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :ivar value_type: The value type of the items in the list. Possible values - include: 'IpCidr', 'String' - :vartype value_type: str or ~azure.mgmt.security.models.ValueType - :param allowlist_values: Required. The values to allow. The format of the - values depends on the rule type. - :type allowlist_values: list[str] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'value_type': {'readonly': True}, - 'allowlist_values': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'value_type': {'key': 'valueType', 'type': 'str'}, - 'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AllowlistCustomAlertRule, self).__init__(**kwargs) - self.allowlist_values = kwargs.get('allowlist_values', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py deleted file mode 100644 index 7f8772c3dbbd..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/allowlist_custom_alert_rule_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .list_custom_alert_rule_py3 import ListCustomAlertRule - - -class AllowlistCustomAlertRule(ListCustomAlertRule): - """A custom alert rule that checks if a value (depends on the custom alert - type) is allowed. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :ivar value_type: The value type of the items in the list. Possible values - include: 'IpCidr', 'String' - :vartype value_type: str or ~azure.mgmt.security.models.ValueType - :param allowlist_values: Required. The values to allow. The format of the - values depends on the rule type. - :type allowlist_values: list[str] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'value_type': {'readonly': True}, - 'allowlist_values': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'value_type': {'key': 'valueType', 'type': 'str'}, - 'allowlist_values': {'key': 'allowlistValues', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool, rule_type: str, allowlist_values, **kwargs) -> None: - super(AllowlistCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) - self.allowlist_values = allowlist_values diff --git a/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py deleted file mode 100644 index 7b8bbed4659f..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomAlertRule(Model): - """A custom alert rule. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomAlertRule, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.is_enabled = kwargs.get('is_enabled', None) - self.rule_type = kwargs.get('rule_type', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py deleted file mode 100644 index 8ecf4bf163cb..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/custom_alert_rule_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomAlertRule(Model): - """A custom alert rule. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - } - - def __init__(self, *, is_enabled: bool, rule_type: str, **kwargs) -> None: - super(CustomAlertRule, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.is_enabled = is_enabled - self.rule_type = rule_type diff --git a/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py deleted file mode 100644 index 976650ae94b9..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .list_custom_alert_rule import ListCustomAlertRule - - -class DenylistCustomAlertRule(ListCustomAlertRule): - """A custom alert rule that checks if a value (depends on the custom alert - type) is denied. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :ivar value_type: The value type of the items in the list. Possible values - include: 'IpCidr', 'String' - :vartype value_type: str or ~azure.mgmt.security.models.ValueType - :param denylist_values: Required. The values to deny. The format of the - values depends on the rule type. - :type denylist_values: list[str] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'value_type': {'readonly': True}, - 'denylist_values': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'value_type': {'key': 'valueType', 'type': 'str'}, - 'denylist_values': {'key': 'denylistValues', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DenylistCustomAlertRule, self).__init__(**kwargs) - self.denylist_values = kwargs.get('denylist_values', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py deleted file mode 100644 index 9813e72eea68..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/denylist_custom_alert_rule_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .list_custom_alert_rule_py3 import ListCustomAlertRule - - -class DenylistCustomAlertRule(ListCustomAlertRule): - """A custom alert rule that checks if a value (depends on the custom alert - type) is denied. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :ivar value_type: The value type of the items in the list. Possible values - include: 'IpCidr', 'String' - :vartype value_type: str or ~azure.mgmt.security.models.ValueType - :param denylist_values: Required. The values to deny. The format of the - values depends on the rule type. - :type denylist_values: list[str] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'value_type': {'readonly': True}, - 'denylist_values': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'value_type': {'key': 'valueType', 'type': 'str'}, - 'denylist_values': {'key': 'denylistValues', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool, rule_type: str, denylist_values, **kwargs) -> None: - super(DenylistCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) - self.denylist_values = denylist_values diff --git a/azure-mgmt-security/azure/mgmt/security/models/device_security_group.py b/azure-mgmt-security/azure/mgmt/security/models/device_security_group.py deleted file mode 100644 index a213758a98c6..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/device_security_group.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DeviceSecurityGroup(Resource): - """The device security group resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param threshold_rules: A list of threshold custom alert rules. - :type threshold_rules: - list[~azure.mgmt.security.models.ThresholdCustomAlertRule] - :param time_window_rules: A list of time window custom alert rules. - :type time_window_rules: - list[~azure.mgmt.security.models.TimeWindowCustomAlertRule] - :param allowlist_rules: A list of allow-list custom alert rules. - :type allowlist_rules: - list[~azure.mgmt.security.models.AllowlistCustomAlertRule] - :param denylist_rules: A list of deny-list custom alert rules. - :type denylist_rules: - list[~azure.mgmt.security.models.DenylistCustomAlertRule] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'threshold_rules': {'key': 'properties.thresholdRules', 'type': '[ThresholdCustomAlertRule]'}, - 'time_window_rules': {'key': 'properties.timeWindowRules', 'type': '[TimeWindowCustomAlertRule]'}, - 'allowlist_rules': {'key': 'properties.allowlistRules', 'type': '[AllowlistCustomAlertRule]'}, - 'denylist_rules': {'key': 'properties.denylistRules', 'type': '[DenylistCustomAlertRule]'}, - } - - def __init__(self, **kwargs): - super(DeviceSecurityGroup, self).__init__(**kwargs) - self.threshold_rules = kwargs.get('threshold_rules', None) - self.time_window_rules = kwargs.get('time_window_rules', None) - self.allowlist_rules = kwargs.get('allowlist_rules', None) - self.denylist_rules = kwargs.get('denylist_rules', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/device_security_group_paged.py b/azure-mgmt-security/azure/mgmt/security/models/device_security_group_paged.py deleted file mode 100644 index cf7fcb32eed7..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/device_security_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DeviceSecurityGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeviceSecurityGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeviceSecurityGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(DeviceSecurityGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py b/azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py deleted file mode 100644 index 9e2a2015d800..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/device_security_group_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class DeviceSecurityGroup(Resource): - """The device security group resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param threshold_rules: A list of threshold custom alert rules. - :type threshold_rules: - list[~azure.mgmt.security.models.ThresholdCustomAlertRule] - :param time_window_rules: A list of time window custom alert rules. - :type time_window_rules: - list[~azure.mgmt.security.models.TimeWindowCustomAlertRule] - :param allowlist_rules: A list of allow-list custom alert rules. - :type allowlist_rules: - list[~azure.mgmt.security.models.AllowlistCustomAlertRule] - :param denylist_rules: A list of deny-list custom alert rules. - :type denylist_rules: - list[~azure.mgmt.security.models.DenylistCustomAlertRule] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'threshold_rules': {'key': 'properties.thresholdRules', 'type': '[ThresholdCustomAlertRule]'}, - 'time_window_rules': {'key': 'properties.timeWindowRules', 'type': '[TimeWindowCustomAlertRule]'}, - 'allowlist_rules': {'key': 'properties.allowlistRules', 'type': '[AllowlistCustomAlertRule]'}, - 'denylist_rules': {'key': 'properties.denylistRules', 'type': '[DenylistCustomAlertRule]'}, - } - - def __init__(self, *, threshold_rules=None, time_window_rules=None, allowlist_rules=None, denylist_rules=None, **kwargs) -> None: - super(DeviceSecurityGroup, self).__init__(**kwargs) - self.threshold_rules = threshold_rules - self.time_window_rules = time_window_rules - self.allowlist_rules = allowlist_rules - self.denylist_rules = denylist_rules diff --git a/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py deleted file mode 100644 index 83ac0df72267..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .custom_alert_rule import CustomAlertRule - - -class ListCustomAlertRule(CustomAlertRule): - """A List custom alert rule. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :ivar value_type: The value type of the items in the list. Possible values - include: 'IpCidr', 'String' - :vartype value_type: str or ~azure.mgmt.security.models.ValueType - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'value_type': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'value_type': {'key': 'valueType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ListCustomAlertRule, self).__init__(**kwargs) - self.value_type = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py deleted file mode 100644 index ae713623de5f..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/list_custom_alert_rule_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .custom_alert_rule_py3 import CustomAlertRule - - -class ListCustomAlertRule(CustomAlertRule): - """A List custom alert rule. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :ivar value_type: The value type of the items in the list. Possible values - include: 'IpCidr', 'String' - :vartype value_type: str or ~azure.mgmt.security.models.ValueType - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'value_type': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'value_type': {'key': 'valueType', 'type': 'str'}, - } - - def __init__(self, *, is_enabled: bool, rule_type: str, **kwargs) -> None: - super(ListCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) - self.value_type = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py deleted file mode 100644 index 471302606092..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RegulatoryComplianceAssessment(Resource): - """Regulatory compliance assessment details and state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar description: The description of the regulatory compliance assessment - :vartype description: str - :ivar assessment_type: The expected type of assessment contained in the - AssessmentDetailsLink - :vartype assessment_type: str - :ivar assessment_details_link: Link to more detailed assessment results - data. The response type will be according to the assessmentType field - :vartype assessment_details_link: str - :param state: Aggregative state based on the assessment's scanned - resources states. Possible values include: 'Passed', 'Failed', 'Skipped', - 'Unsupported' - :type state: str or ~azure.mgmt.security.models.State - :ivar passed_resources: The given assessment's related resources count - with passed state. - :vartype passed_resources: int - :ivar failed_resources: The given assessment's related resources count - with failed state. - :vartype failed_resources: int - :ivar skipped_resources: The given assessment's related resources count - with skipped state. - :vartype skipped_resources: int - :ivar unsupported_resources: The given assessment's related resources - count with unsupported state. - :vartype unsupported_resources: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'assessment_type': {'readonly': True}, - 'assessment_details_link': {'readonly': True}, - 'passed_resources': {'readonly': True}, - 'failed_resources': {'readonly': True}, - 'skipped_resources': {'readonly': True}, - 'unsupported_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, - 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, - 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, - 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, - 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RegulatoryComplianceAssessment, self).__init__(**kwargs) - self.description = None - self.assessment_type = None - self.assessment_details_link = None - self.state = kwargs.get('state', None) - self.passed_resources = None - self.failed_resources = None - self.skipped_resources = None - self.unsupported_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py deleted file mode 100644 index f5661a66b539..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RegulatoryComplianceAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`RegulatoryComplianceAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(RegulatoryComplianceAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py deleted file mode 100644 index 92bad19c1805..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_assessment_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RegulatoryComplianceAssessment(Resource): - """Regulatory compliance assessment details and state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar description: The description of the regulatory compliance assessment - :vartype description: str - :ivar assessment_type: The expected type of assessment contained in the - AssessmentDetailsLink - :vartype assessment_type: str - :ivar assessment_details_link: Link to more detailed assessment results - data. The response type will be according to the assessmentType field - :vartype assessment_details_link: str - :param state: Aggregative state based on the assessment's scanned - resources states. Possible values include: 'Passed', 'Failed', 'Skipped', - 'Unsupported' - :type state: str or ~azure.mgmt.security.models.State - :ivar passed_resources: The given assessment's related resources count - with passed state. - :vartype passed_resources: int - :ivar failed_resources: The given assessment's related resources count - with failed state. - :vartype failed_resources: int - :ivar skipped_resources: The given assessment's related resources count - with skipped state. - :vartype skipped_resources: int - :ivar unsupported_resources: The given assessment's related resources - count with unsupported state. - :vartype unsupported_resources: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'assessment_type': {'readonly': True}, - 'assessment_details_link': {'readonly': True}, - 'passed_resources': {'readonly': True}, - 'failed_resources': {'readonly': True}, - 'skipped_resources': {'readonly': True}, - 'unsupported_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, - 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, - 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, - 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, - 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, - } - - def __init__(self, *, state=None, **kwargs) -> None: - super(RegulatoryComplianceAssessment, self).__init__(**kwargs) - self.description = None - self.assessment_type = None - self.assessment_details_link = None - self.state = state - self.passed_resources = None - self.failed_resources = None - self.skipped_resources = None - self.unsupported_resources = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py deleted file mode 100644 index ab7accd57683..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RegulatoryComplianceControl(Resource): - """Regulatory compliance control details and state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar description: The description of the regulatory compliance control - :vartype description: str - :param state: Aggregative state based on the control's supported - assessments states. Possible values include: 'Passed', 'Failed', - 'Skipped', 'Unsupported' - :type state: str or ~azure.mgmt.security.models.State - :ivar passed_assessments: The number of supported regulatory compliance - assessments of the given control with a passed state - :vartype passed_assessments: int - :ivar failed_assessments: The number of supported regulatory compliance - assessments of the given control with a failed state - :vartype failed_assessments: int - :ivar skipped_assessments: The number of supported regulatory compliance - assessments of the given control with a skipped state - :vartype skipped_assessments: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'passed_assessments': {'readonly': True}, - 'failed_assessments': {'readonly': True}, - 'skipped_assessments': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, - 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, - 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RegulatoryComplianceControl, self).__init__(**kwargs) - self.description = None - self.state = kwargs.get('state', None) - self.passed_assessments = None - self.failed_assessments = None - self.skipped_assessments = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py deleted file mode 100644 index 22210d83bc43..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RegulatoryComplianceControlPaged(Paged): - """ - A paging container for iterating over a list of :class:`RegulatoryComplianceControl ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceControl]'} - } - - def __init__(self, *args, **kwargs): - - super(RegulatoryComplianceControlPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py deleted file mode 100644 index 0eaf9208895c..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_control_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RegulatoryComplianceControl(Resource): - """Regulatory compliance control details and state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar description: The description of the regulatory compliance control - :vartype description: str - :param state: Aggregative state based on the control's supported - assessments states. Possible values include: 'Passed', 'Failed', - 'Skipped', 'Unsupported' - :type state: str or ~azure.mgmt.security.models.State - :ivar passed_assessments: The number of supported regulatory compliance - assessments of the given control with a passed state - :vartype passed_assessments: int - :ivar failed_assessments: The number of supported regulatory compliance - assessments of the given control with a failed state - :vartype failed_assessments: int - :ivar skipped_assessments: The number of supported regulatory compliance - assessments of the given control with a skipped state - :vartype skipped_assessments: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'passed_assessments': {'readonly': True}, - 'failed_assessments': {'readonly': True}, - 'skipped_assessments': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, - 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, - 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, - } - - def __init__(self, *, state=None, **kwargs) -> None: - super(RegulatoryComplianceControl, self).__init__(**kwargs) - self.description = None - self.state = state - self.passed_assessments = None - self.failed_assessments = None - self.skipped_assessments = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py deleted file mode 100644 index 052a8a90edbc..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RegulatoryComplianceStandard(Resource): - """Regulatory compliance standard details and state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param state: Aggregative state based on the standard's supported controls - states. Possible values include: 'Passed', 'Failed', 'Skipped', - 'Unsupported' - :type state: str or ~azure.mgmt.security.models.State - :ivar passed_controls: The number of supported regulatory compliance - controls of the given standard with a passed state - :vartype passed_controls: int - :ivar failed_controls: The number of supported regulatory compliance - controls of the given standard with a failed state - :vartype failed_controls: int - :ivar skipped_controls: The number of supported regulatory compliance - controls of the given standard with a skipped state - :vartype skipped_controls: int - :ivar unsupported_controls: The number of regulatory compliance controls - of the given standard which are unsupported by automated assessments - :vartype unsupported_controls: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'passed_controls': {'readonly': True}, - 'failed_controls': {'readonly': True}, - 'skipped_controls': {'readonly': True}, - 'unsupported_controls': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, - 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, - 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, - 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RegulatoryComplianceStandard, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.passed_controls = None - self.failed_controls = None - self.skipped_controls = None - self.unsupported_controls = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py deleted file mode 100644 index 8f091eee07be..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RegulatoryComplianceStandardPaged(Paged): - """ - A paging container for iterating over a list of :class:`RegulatoryComplianceStandard ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceStandard]'} - } - - def __init__(self, *args, **kwargs): - - super(RegulatoryComplianceStandardPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py b/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py deleted file mode 100644 index 9abfdccc46f2..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/regulatory_compliance_standard_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RegulatoryComplianceStandard(Resource): - """Regulatory compliance standard details and state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param state: Aggregative state based on the standard's supported controls - states. Possible values include: 'Passed', 'Failed', 'Skipped', - 'Unsupported' - :type state: str or ~azure.mgmt.security.models.State - :ivar passed_controls: The number of supported regulatory compliance - controls of the given standard with a passed state - :vartype passed_controls: int - :ivar failed_controls: The number of supported regulatory compliance - controls of the given standard with a failed state - :vartype failed_controls: int - :ivar skipped_controls: The number of supported regulatory compliance - controls of the given standard with a skipped state - :vartype skipped_controls: int - :ivar unsupported_controls: The number of regulatory compliance controls - of the given standard which are unsupported by automated assessments - :vartype unsupported_controls: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'passed_controls': {'readonly': True}, - 'failed_controls': {'readonly': True}, - 'skipped_controls': {'readonly': True}, - 'unsupported_controls': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, - 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, - 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, - 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, - } - - def __init__(self, *, state=None, **kwargs) -> None: - super(RegulatoryComplianceStandard, self).__init__(**kwargs) - self.state = state - self.passed_controls = None - self.failed_controls = None - self.skipped_controls = None - self.unsupported_controls = None diff --git a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py index 39b8772f9c3a..d075c87db018 100644 --- a/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ b/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py @@ -12,42 +12,18 @@ from enum import Enum -class State(str, Enum): - - passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state - failed = "Failed" #: At least one supported regulatory compliance control in the given standard has a state of failed - skipped = "Skipped" #: All supported regulatory compliance controls in the given standard have a state of skipped - unsupported = "Unsupported" #: No supported regulatory compliance data for the given standard - - class PricingTier(str, Enum): free = "Free" #: Get free Azure security center experience with basic security features standard = "Standard" #: Get the standard Azure security center experience with advanced security features -class AlertNotifications(str, Enum): - - on = "On" #: Get notifications on new alerts - off = "Off" #: Don't get notifications on new alerts - - -class AlertsToAdmins(str, Enum): - - on = "On" #: Send notification on new alerts to the subscription's admins - off = "Off" #: Don't send notification on new alerts to the subscription's admins - - -class AutoProvision(str, Enum): - - on = "On" #: Install missing security agent on VMs automatically - off = "Off" #: Do not install security agent on the VMs automatically - - -class ValueType(str, Enum): +class ReportedSeverity(str, Enum): - ip_cidr = "IpCidr" #: An IP range in CIDR format (e.g. '192.168.0.1/8'). - string = "String" #: Any string value. + informational = "Informational" + low = "Low" + medium = "Medium" + high = "High" class SettingKind(str, Enum): @@ -56,14 +32,6 @@ class SettingKind(str, Enum): alert_suppression_setting = "AlertSuppressionSetting" -class ReportedSeverity(str, Enum): - - informational = "Informational" - low = "Low" - medium = "Medium" - high = "High" - - class SecurityFamily(str, Enum): waf = "Waf" @@ -72,6 +40,20 @@ class SecurityFamily(str, Enum): va = "Va" +class AadConnectivityState(str, Enum): + + discovered = "Discovered" + not_licensed = "NotLicensed" + connected = "Connected" + + +class ExternalSecuritySolutionKind(str, Enum): + + cef = "CEF" + ata = "ATA" + aad = "AAD" + + class Protocol(str, Enum): tcp = "TCP" @@ -92,18 +74,22 @@ class StatusReason(str, Enum): newer_request_initiated = "NewerRequestInitiated" -class AadConnectivityState(str, Enum): +class AutoProvision(str, Enum): - discovered = "Discovered" - not_licensed = "NotLicensed" - connected = "Connected" + on = "On" #: Install missing security agent on VMs automatically + off = "Off" #: Do not install security agent on the VMs automatically -class ExternalSecuritySolutionKind(str, Enum): +class AlertNotifications(str, Enum): - cef = "CEF" - ata = "ATA" - aad = "AAD" + on = "On" #: Get notifications on new alerts + off = "Off" #: Don't get notifications on new alerts + + +class AlertsToAdmins(str, Enum): + + on = "On" #: Send notification on new alerts to the subscription's admins + off = "Off" #: Don't send notification on new alerts to the subscription's admins class ConnectionType(str, Enum): diff --git a/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.py deleted file mode 100644 index 4e6306190e2b..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .custom_alert_rule import CustomAlertRule - - -class ThresholdCustomAlertRule(CustomAlertRule): - """A custom alert rule that checks if a value (depends on the custom alert - type) is within the given range. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :param min_threshold: Required. The minimum threshold. - :type min_threshold: int - :param max_threshold: Required. The maximum threshold. - :type max_threshold: int - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'min_threshold': {'required': True}, - 'max_threshold': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, - 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ThresholdCustomAlertRule, self).__init__(**kwargs) - self.min_threshold = kwargs.get('min_threshold', None) - self.max_threshold = kwargs.get('max_threshold', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_py3.py deleted file mode 100644 index 63c5567caceb..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/threshold_custom_alert_rule_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .custom_alert_rule_py3 import CustomAlertRule - - -class ThresholdCustomAlertRule(CustomAlertRule): - """A custom alert rule that checks if a value (depends on the custom alert - type) is within the given range. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :param min_threshold: Required. The minimum threshold. - :type min_threshold: int - :param max_threshold: Required. The maximum threshold. - :type max_threshold: int - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'min_threshold': {'required': True}, - 'max_threshold': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, - 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, - } - - def __init__(self, *, is_enabled: bool, rule_type: str, min_threshold: int, max_threshold: int, **kwargs) -> None: - super(ThresholdCustomAlertRule, self).__init__(is_enabled=is_enabled, rule_type=rule_type, **kwargs) - self.min_threshold = min_threshold - self.max_threshold = max_threshold diff --git a/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py b/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py deleted file mode 100644 index 224d5a3dc0ea..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TimeWindowCustomAlertRule(Model): - """A custom alert rule that checks if the number of activities (depends on the - custom alert type) in a time window is within the given range. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :param min_threshold: Required. The minimum threshold. - :type min_threshold: int - :param max_threshold: Required. The maximum threshold. - :type max_threshold: int - :param time_window_size: Required. The time window size in iso8601 format. - :type time_window_size: timedelta - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'min_threshold': {'required': True}, - 'max_threshold': {'required': True}, - 'time_window_size': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, - 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, - 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(TimeWindowCustomAlertRule, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.is_enabled = kwargs.get('is_enabled', None) - self.rule_type = kwargs.get('rule_type', None) - self.min_threshold = kwargs.get('min_threshold', None) - self.max_threshold = kwargs.get('max_threshold', None) - self.time_window_size = kwargs.get('time_window_size', None) diff --git a/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py b/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py deleted file mode 100644 index 0a2962dddb94..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/models/time_window_custom_alert_rule_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TimeWindowCustomAlertRule(Model): - """A custom alert rule that checks if the number of activities (depends on the - custom alert type) in a time window is within the given range. - - 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 display_name: The display name of the custom alert. - :vartype display_name: str - :ivar description: The description of the custom alert. - :vartype description: str - :param is_enabled: Required. Whether the custom alert is enabled. - :type is_enabled: bool - :param rule_type: Required. The type of the custom alert rule. - :type rule_type: str - :param min_threshold: Required. The minimum threshold. - :type min_threshold: int - :param max_threshold: Required. The maximum threshold. - :type max_threshold: int - :param time_window_size: Required. The time window size in iso8601 format. - :type time_window_size: timedelta - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'is_enabled': {'required': True}, - 'rule_type': {'required': True}, - 'min_threshold': {'required': True}, - 'max_threshold': {'required': True}, - 'time_window_size': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'rule_type': {'key': 'ruleType', 'type': 'str'}, - 'min_threshold': {'key': 'minThreshold', 'type': 'int'}, - 'max_threshold': {'key': 'maxThreshold', 'type': 'int'}, - 'time_window_size': {'key': 'timeWindowSize', 'type': 'duration'}, - } - - def __init__(self, *, is_enabled: bool, rule_type: str, min_threshold: int, max_threshold: int, time_window_size, **kwargs) -> None: - super(TimeWindowCustomAlertRule, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.is_enabled = is_enabled - self.rule_type = rule_type - self.min_threshold = min_threshold - self.max_threshold = max_threshold - self.time_window_size = time_window_size diff --git a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index d16a4df3422e..23522fd792f8 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -9,48 +9,40 @@ # regenerated. # -------------------------------------------------------------------------- -from .regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations -from .regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations -from .regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations from .pricings_operations import PricingsOperations -from .security_contacts_operations import SecurityContactsOperations -from .workspace_settings_operations import WorkspaceSettingsOperations -from .auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .compliances_operations import CompliancesOperations -from .advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .device_security_groups_operations import DeviceSecurityGroupsOperations -from .settings_operations import SettingsOperations -from .information_protection_policies_operations import InformationProtectionPoliciesOperations -from .operations import Operations -from .locations_operations import LocationsOperations -from .tasks_operations import TasksOperations from .alerts_operations import AlertsOperations +from .settings_operations import SettingsOperations +from .allowed_connections_operations import AllowedConnectionsOperations from .discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations from .external_security_solutions_operations import ExternalSecuritySolutionsOperations +from .jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations +from .locations_operations import LocationsOperations +from .operations import Operations +from .tasks_operations import TasksOperations from .topology_operations import TopologyOperations -from .allowed_connections_operations import AllowedConnectionsOperations +from .advanced_threat_protection_operations import AdvancedThreatProtectionOperations +from .auto_provisioning_settings_operations import AutoProvisioningSettingsOperations +from .compliances_operations import CompliancesOperations +from .information_protection_policies_operations import InformationProtectionPoliciesOperations +from .security_contacts_operations import SecurityContactsOperations +from .workspace_settings_operations import WorkspaceSettingsOperations __all__ = [ - 'RegulatoryComplianceStandardsOperations', - 'RegulatoryComplianceControlsOperations', - 'RegulatoryComplianceAssessmentsOperations', 'PricingsOperations', - 'SecurityContactsOperations', - 'WorkspaceSettingsOperations', - 'AutoProvisioningSettingsOperations', - 'CompliancesOperations', - 'AdvancedThreatProtectionOperations', - 'DeviceSecurityGroupsOperations', - 'SettingsOperations', - 'InformationProtectionPoliciesOperations', - 'Operations', - 'LocationsOperations', - 'TasksOperations', 'AlertsOperations', + 'SettingsOperations', + 'AllowedConnectionsOperations', 'DiscoveredSecuritySolutionsOperations', - 'JitNetworkAccessPoliciesOperations', 'ExternalSecuritySolutionsOperations', + 'JitNetworkAccessPoliciesOperations', + 'LocationsOperations', + 'Operations', + 'TasksOperations', 'TopologyOperations', - 'AllowedConnectionsOperations', + 'AdvancedThreatProtectionOperations', + 'AutoProvisioningSettingsOperations', + 'CompliancesOperations', + 'InformationProtectionPoliciesOperations', + 'SecurityContactsOperations', + 'WorkspaceSettingsOperations', ] diff --git a/azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py deleted file mode 100644 index a55f1ed2f3c9..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/operations/device_security_groups_operations.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DeviceSecurityGroupsOperations(object): - """DeviceSecurityGroupsOperations 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: API version for the operation. Constant value: "2017-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-08-01-preview" - - self.config = config - - def list( - self, resource_id, custom_headers=None, raw=False, **operation_config): - """Gets the list of device security groups for the specified IoT hub - resource. - - :param resource_id: The identifier of the resource. - :type resource_id: 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 DeviceSecurityGroup - :rtype: - ~azure.mgmt.security.models.DeviceSecurityGroupPaged[~azure.mgmt.security.models.DeviceSecurityGroup] - :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 = { - 'resourceId': self._serialize.url("resource_id", resource_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['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DeviceSecurityGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DeviceSecurityGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups'} - - def get( - self, resource_id, device_security_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the device security group for the specified IoT hub resource. - - :param resource_id: The identifier of the resource. - :type resource_id: str - :param device_security_group_name: The name of the security group. - Please notice that the name is case insensitive. - :type device_security_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeviceSecurityGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.DeviceSecurityGroup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), - 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DeviceSecurityGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} - - def create_or_update( - self, resource_id, device_security_group_name, device_security_group, custom_headers=None, raw=False, **operation_config): - """Creates or updates the device security group on a specified IoT hub - resource. - - :param resource_id: The identifier of the resource. - :type resource_id: str - :param device_security_group_name: The name of the security group. - Please notice that the name is case insensitive. - :type device_security_group_name: str - :param device_security_group: Security group object. - :type device_security_group: - ~azure.mgmt.security.models.DeviceSecurityGroup - :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: DeviceSecurityGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.DeviceSecurityGroup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), - 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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(device_security_group, 'DeviceSecurityGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('DeviceSecurityGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('DeviceSecurityGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} - - def delete( - self, resource_id, device_security_group_name, custom_headers=None, raw=False, **operation_config): - """Deletes the security group. - - :param resource_id: The identifier of the resource. - :type resource_id: str - :param device_security_group_name: The name of the security group. - Please notice that the name is case insensitive. - :type device_security_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), - 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py deleted file mode 100644 index afc2c6d0adfd..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_assessments_operations.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RegulatoryComplianceAssessmentsOperations(object): - """RegulatoryComplianceAssessmentsOperations 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: API version for the operation. Constant value: "2019-01-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01-preview" - - self.config = config - - def list( - self, resource_group_name, regulatory_compliance_standard_name, regulatory_compliance_control_name, filter=None, custom_headers=None, raw=False, **operation_config): - """Details and state of assessments mapped to selected regulatory - compliance control. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param regulatory_compliance_standard_name: Name of the regulatory - compliance standard object - :type regulatory_compliance_standard_name: str - :param regulatory_compliance_control_name: Name of the regulatory - compliance control object - :type regulatory_compliance_control_name: str - :param filter: OData filter. Optional. - :type filter: 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 RegulatoryComplianceAssessment - :rtype: - ~azure.mgmt.security.models.RegulatoryComplianceAssessmentPaged[~azure.mgmt.security.models.RegulatoryComplianceAssessment] - :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 = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), - 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments'} - - def get( - self, resource_group_name, regulatory_compliance_standard_name, regulatory_compliance_control_name, regulatory_compliance_assessment_name, custom_headers=None, raw=False, **operation_config): - """Supported regulatory compliance details and state for selected - assessment. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param regulatory_compliance_standard_name: Name of the regulatory - compliance standard object - :type regulatory_compliance_standard_name: str - :param regulatory_compliance_control_name: Name of the regulatory - compliance control object - :type regulatory_compliance_control_name: str - :param regulatory_compliance_assessment_name: Name of the regulatory - compliance assessment object - :type regulatory_compliance_assessment_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: RegulatoryComplianceAssessment or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.security.models.RegulatoryComplianceAssessment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), - 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str'), - 'regulatoryComplianceAssessmentName': self._serialize.url("regulatory_compliance_assessment_name", regulatory_compliance_assessment_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RegulatoryComplianceAssessment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py deleted file mode 100644 index 9b5db20ec2eb..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_controls_operations.py +++ /dev/null @@ -1,183 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RegulatoryComplianceControlsOperations(object): - """RegulatoryComplianceControlsOperations 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: API version for the operation. Constant value: "2019-01-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01-preview" - - self.config = config - - def list( - self, resource_group_name, regulatory_compliance_standard_name, filter=None, custom_headers=None, raw=False, **operation_config): - """All supported regulatory compliance controls details and state for - selected standard. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param regulatory_compliance_standard_name: Name of the regulatory - compliance standard object - :type regulatory_compliance_standard_name: str - :param filter: OData filter. Optional. - :type filter: 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 RegulatoryComplianceControl - :rtype: - ~azure.mgmt.security.models.RegulatoryComplianceControlPaged[~azure.mgmt.security.models.RegulatoryComplianceControl] - :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 = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls'} - - def get( - self, resource_group_name, regulatory_compliance_standard_name, regulatory_compliance_control_name, custom_headers=None, raw=False, **operation_config): - """Selected regulatory compliance control details and state. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param regulatory_compliance_standard_name: Name of the regulatory - compliance standard object - :type regulatory_compliance_standard_name: str - :param regulatory_compliance_control_name: Name of the regulatory - compliance control object - :type regulatory_compliance_control_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: RegulatoryComplianceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.RegulatoryComplianceControl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), - 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RegulatoryComplianceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py deleted file mode 100644 index 43a9ce7a73ce..000000000000 --- a/azure-mgmt-security/azure/mgmt/security/operations/regulatory_compliance_standards_operations.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RegulatoryComplianceStandardsOperations(object): - """RegulatoryComplianceStandardsOperations 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: API version for the operation. Constant value: "2019-01-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01-preview" - - self.config = config - - def list( - self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): - """Supported regulatory compliance standards details and state. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param filter: OData filter. Optional. - :type filter: 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 RegulatoryComplianceStandard - :rtype: - ~azure.mgmt.security.models.RegulatoryComplianceStandardPaged[~azure.mgmt.security.models.RegulatoryComplianceStandard] - :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 = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - 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') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards'} - - def get( - self, resource_group_name, regulatory_compliance_standard_name, custom_headers=None, raw=False, **operation_config): - """Supported regulatory compliance details state for selected standard. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param regulatory_compliance_standard_name: Name of the regulatory - compliance standard object - :type regulatory_compliance_standard_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: RegulatoryComplianceStandard or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.RegulatoryComplianceStandard or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RegulatoryComplianceStandard', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}'} diff --git a/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py b/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py index 6aef42b410e1..b36f8f8b2b4b 100644 --- a/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py +++ b/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py @@ -23,7 +23,7 @@ class SettingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar api_version: API version for the operation. Constant value: "2019-01-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-08-01-preview" + self.api_version = "2019-01-01" self.config = config diff --git a/azure-mgmt-security/azure/mgmt/security/security_center.py b/azure-mgmt-security/azure/mgmt/security/security_center.py index 43de544dc1eb..38888caff012 100644 --- a/azure-mgmt-security/azure/mgmt/security/security_center.py +++ b/azure-mgmt-security/azure/mgmt/security/security_center.py @@ -13,27 +13,23 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations -from .operations.regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations -from .operations.regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations from .operations.pricings_operations import PricingsOperations -from .operations.security_contacts_operations import SecurityContactsOperations -from .operations.workspace_settings_operations import WorkspaceSettingsOperations -from .operations.auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .operations.compliances_operations import CompliancesOperations -from .operations.advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .operations.device_security_groups_operations import DeviceSecurityGroupsOperations -from .operations.settings_operations import SettingsOperations -from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations -from .operations.operations import Operations -from .operations.locations_operations import LocationsOperations -from .operations.tasks_operations import TasksOperations from .operations.alerts_operations import AlertsOperations +from .operations.settings_operations import SettingsOperations +from .operations.allowed_connections_operations import AllowedConnectionsOperations from .operations.discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .operations.jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations from .operations.external_security_solutions_operations import ExternalSecuritySolutionsOperations +from .operations.jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations +from .operations.locations_operations import LocationsOperations +from .operations.operations import Operations +from .operations.tasks_operations import TasksOperations from .operations.topology_operations import TopologyOperations -from .operations.allowed_connections_operations import AllowedConnectionsOperations +from .operations.advanced_threat_protection_operations import AdvancedThreatProtectionOperations +from .operations.auto_provisioning_settings_operations import AutoProvisioningSettingsOperations +from .operations.compliances_operations import CompliancesOperations +from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations +from .operations.security_contacts_operations import SecurityContactsOperations +from .operations.workspace_settings_operations import WorkspaceSettingsOperations from . import models @@ -81,48 +77,40 @@ class SecurityCenter(SDKClient): :ivar config: Configuration for client. :vartype config: SecurityCenterConfiguration - :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations - :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations - :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations - :vartype regulatory_compliance_controls: azure.mgmt.security.operations.RegulatoryComplianceControlsOperations - :ivar regulatory_compliance_assessments: RegulatoryComplianceAssessments operations - :vartype regulatory_compliance_assessments: azure.mgmt.security.operations.RegulatoryComplianceAssessmentsOperations :ivar pricings: Pricings operations :vartype pricings: azure.mgmt.security.operations.PricingsOperations - :ivar security_contacts: SecurityContacts operations - :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations - :ivar workspace_settings: WorkspaceSettings operations - :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations - :ivar auto_provisioning_settings: AutoProvisioningSettings operations - :vartype auto_provisioning_settings: azure.mgmt.security.operations.AutoProvisioningSettingsOperations - :ivar compliances: Compliances operations - :vartype compliances: azure.mgmt.security.operations.CompliancesOperations - :ivar advanced_threat_protection: AdvancedThreatProtection operations - :vartype advanced_threat_protection: azure.mgmt.security.operations.AdvancedThreatProtectionOperations - :ivar device_security_groups: DeviceSecurityGroups operations - :vartype device_security_groups: azure.mgmt.security.operations.DeviceSecurityGroupsOperations - :ivar settings: Settings operations - :vartype settings: azure.mgmt.security.operations.SettingsOperations - :ivar information_protection_policies: InformationProtectionPolicies operations - :vartype information_protection_policies: azure.mgmt.security.operations.InformationProtectionPoliciesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.security.operations.Operations - :ivar locations: Locations operations - :vartype locations: azure.mgmt.security.operations.LocationsOperations - :ivar tasks: Tasks operations - :vartype tasks: azure.mgmt.security.operations.TasksOperations :ivar alerts: Alerts operations :vartype alerts: azure.mgmt.security.operations.AlertsOperations + :ivar settings: Settings operations + :vartype settings: azure.mgmt.security.operations.SettingsOperations + :ivar allowed_connections: AllowedConnections operations + :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations :vartype discovered_security_solutions: azure.mgmt.security.operations.DiscoveredSecuritySolutionsOperations - :ivar jit_network_access_policies: JitNetworkAccessPolicies operations - :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations :ivar external_security_solutions: ExternalSecuritySolutions operations :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations + :ivar jit_network_access_policies: JitNetworkAccessPolicies operations + :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations + :ivar locations: Locations operations + :vartype locations: azure.mgmt.security.operations.LocationsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.security.operations.Operations + :ivar tasks: Tasks operations + :vartype tasks: azure.mgmt.security.operations.TasksOperations :ivar topology: Topology operations :vartype topology: azure.mgmt.security.operations.TopologyOperations - :ivar allowed_connections: AllowedConnections operations - :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations + :ivar advanced_threat_protection: AdvancedThreatProtection operations + :vartype advanced_threat_protection: azure.mgmt.security.operations.AdvancedThreatProtectionOperations + :ivar auto_provisioning_settings: AutoProvisioningSettings operations + :vartype auto_provisioning_settings: azure.mgmt.security.operations.AutoProvisioningSettingsOperations + :ivar compliances: Compliances operations + :vartype compliances: azure.mgmt.security.operations.CompliancesOperations + :ivar information_protection_policies: InformationProtectionPolicies operations + :vartype information_protection_policies: azure.mgmt.security.operations.InformationProtectionPoliciesOperations + :ivar security_contacts: SecurityContacts operations + :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations + :ivar workspace_settings: WorkspaceSettings operations + :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -145,45 +133,37 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.regulatory_compliance_assessments = RegulatoryComplianceAssessmentsOperations( - self._client, self.config, self._serialize, self._deserialize) self.pricings = PricingsOperations( self._client, self.config, self._serialize, self._deserialize) - self.security_contacts = SecurityContactsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workspace_settings = WorkspaceSettingsOperations( + self.alerts = AlertsOperations( self._client, self.config, self._serialize, self._deserialize) - self.auto_provisioning_settings = AutoProvisioningSettingsOperations( + self.settings = SettingsOperations( self._client, self.config, self._serialize, self._deserialize) - self.compliances = CompliancesOperations( + self.allowed_connections = AllowedConnectionsOperations( self._client, self.config, self._serialize, self._deserialize) - self.advanced_threat_protection = AdvancedThreatProtectionOperations( + self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( self._client, self.config, self._serialize, self._deserialize) - self.device_security_groups = DeviceSecurityGroupsOperations( + self.external_security_solutions = ExternalSecuritySolutionsOperations( self._client, self.config, self._serialize, self._deserialize) - self.settings = SettingsOperations( + self.jit_network_access_policies = JitNetworkAccessPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) - self.information_protection_policies = InformationProtectionPoliciesOperations( + self.locations = LocationsOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.locations = LocationsOperations( - self._client, self.config, self._serialize, self._deserialize) self.tasks = TasksOperations( self._client, self.config, self._serialize, self._deserialize) - self.alerts = AlertsOperations( + self.topology = TopologyOperations( self._client, self.config, self._serialize, self._deserialize) - self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( + self.advanced_threat_protection = AdvancedThreatProtectionOperations( self._client, self.config, self._serialize, self._deserialize) - self.jit_network_access_policies = JitNetworkAccessPoliciesOperations( + self.auto_provisioning_settings = AutoProvisioningSettingsOperations( self._client, self.config, self._serialize, self._deserialize) - self.external_security_solutions = ExternalSecuritySolutionsOperations( + self.compliances = CompliancesOperations( self._client, self.config, self._serialize, self._deserialize) - self.topology = TopologyOperations( + self.information_protection_policies = InformationProtectionPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) - self.allowed_connections = AllowedConnectionsOperations( + self.security_contacts = SecurityContactsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_settings = WorkspaceSettingsOperations( self._client, self.config, self._serialize, self._deserialize) From fb07c1e7141348d064d92e9c6fa762f40be18551 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Sat, 6 Apr 2019 15:02:57 +0000 Subject: [PATCH 16/17] Packaging update of azure-mgmt-security --- azure-mgmt-security/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-mgmt-security/setup.py b/azure-mgmt-security/setup.py index fc4a6d29b82c..eaf6f78dff3b 100644 --- a/azure-mgmt-security/setup.py +++ b/azure-mgmt-security/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', From 5ebe6caaa80b899a6daf3699c944ca8669f32580 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 16 Apr 2019 16:46:58 -0700 Subject: [PATCH 17/17] Update HISTORY.rst --- azure-mgmt-security/HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-security/HISTORY.rst b/azure-mgmt-security/HISTORY.rst index ada19504aab6..557b6e935083 100644 --- a/azure-mgmt-security/HISTORY.rst +++ b/azure-mgmt-security/HISTORY.rst @@ -3,7 +3,7 @@ Release History =============== -0.2.0 (2019-03-04) +0.2.0 (2019-04-16) ++++++++++++++++++ **Features**