diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/_meta.json b/sdk/securityinsight/azure-mgmt-securityinsight/_meta.json index ac51c182a2ac..98e291d6bff8 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/_meta.json +++ b/sdk/securityinsight/azure-mgmt-securityinsight/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.12.0", "@autorest/modelerfour@4.19.3" ], - "commit": "e432d9cc87bfed320d8feead4b448be9481c9181", + "commit": "3898549d3b323f215490e915c4f9008dc141a311", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/securityinsights/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_configuration.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_configuration.py index 68120f967f9f..991fb8dda741 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_configuration.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2022-01-01-preview" + self.api_version = "2022-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-securityinsight/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_metadata.json b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_metadata.json index f848734c87ec..4a960e218ecf 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_metadata.json +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2022-01-01-preview", - "total_api_version_list": ["2022-01-01-preview"], + "chosen_version": "2022-05-01-preview", + "total_api_version_list": ["2022-05-01-preview"], "client": { "name": "SecurityInsights", "filename": "_security_insights", @@ -8,7 +8,7 @@ "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, - "has_lro_operations": false, + "has_lro_operations": true, "client_side_validation": false, "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityInsightsConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityInsightsConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" @@ -113,6 +113,7 @@ "entity_relations": "EntityRelationsOperations", "entity_queries": "EntityQueriesOperations", "entity_query_templates": "EntityQueryTemplatesOperations", + "file_imports": "FileImportsOperations", "incident_comments": "IncidentCommentsOperations", "incident_relations": "IncidentRelationsOperations", "metadata": "MetadataOperations", diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_security_insights.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_security_insights.py index 9f661eb02ace..4b017a2dcf61 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_security_insights.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_security_insights.py @@ -15,7 +15,7 @@ from . import models from ._configuration import SecurityInsightsConfiguration -from .operations import ActionsOperations, AlertRuleTemplatesOperations, AlertRulesOperations, AutomationRulesOperations, BookmarkOperations, BookmarkRelationsOperations, BookmarksOperations, DataConnectorsCheckRequirementsOperations, DataConnectorsOperations, DomainWhoisOperations, EntitiesGetTimelineOperations, EntitiesOperations, EntitiesRelationsOperations, EntityQueriesOperations, EntityQueryTemplatesOperations, EntityRelationsOperations, IPGeodataOperations, IncidentCommentsOperations, IncidentRelationsOperations, IncidentsOperations, MetadataOperations, OfficeConsentsOperations, Operations, ProductSettingsOperations, SentinelOnboardingStatesOperations, SourceControlOperations, SourceControlsOperations, ThreatIntelligenceIndicatorMetricsOperations, ThreatIntelligenceIndicatorOperations, ThreatIntelligenceIndicatorsOperations, WatchlistItemsOperations, WatchlistsOperations +from .operations import ActionsOperations, AlertRuleTemplatesOperations, AlertRulesOperations, AutomationRulesOperations, BookmarkOperations, BookmarkRelationsOperations, BookmarksOperations, DataConnectorsCheckRequirementsOperations, DataConnectorsOperations, DomainWhoisOperations, EntitiesGetTimelineOperations, EntitiesOperations, EntitiesRelationsOperations, EntityQueriesOperations, EntityQueryTemplatesOperations, EntityRelationsOperations, FileImportsOperations, IPGeodataOperations, IncidentCommentsOperations, IncidentRelationsOperations, IncidentsOperations, MetadataOperations, OfficeConsentsOperations, Operations, ProductSettingsOperations, SentinelOnboardingStatesOperations, SourceControlOperations, SourceControlsOperations, ThreatIntelligenceIndicatorMetricsOperations, ThreatIntelligenceIndicatorOperations, ThreatIntelligenceIndicatorsOperations, WatchlistItemsOperations, WatchlistsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -59,6 +59,8 @@ class SecurityInsights: :ivar entity_query_templates: EntityQueryTemplatesOperations operations :vartype entity_query_templates: azure.mgmt.securityinsight.operations.EntityQueryTemplatesOperations + :ivar file_imports: FileImportsOperations operations + :vartype file_imports: azure.mgmt.securityinsight.operations.FileImportsOperations :ivar incident_comments: IncidentCommentsOperations operations :vartype incident_comments: azure.mgmt.securityinsight.operations.IncidentCommentsOperations :ivar incident_relations: IncidentRelationsOperations operations @@ -103,6 +105,8 @@ class SecurityInsights: :type subscription_id: str :param base_url: Service URL. Default value is 'https://management.azure.com'. :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -135,6 +139,7 @@ def __init__( self.entity_relations = EntityRelationsOperations(self._client, self._config, self._serialize, self._deserialize) self.entity_queries = EntityQueriesOperations(self._client, self._config, self._serialize, self._deserialize) self.entity_query_templates = EntityQueryTemplatesOperations(self._client, self._config, self._serialize, self._deserialize) + self.file_imports = FileImportsOperations(self._client, self._config, self._serialize, self._deserialize) self.incident_comments = IncidentCommentsOperations(self._client, self._config, self._serialize, self._deserialize) self.incident_relations = IncidentRelationsOperations(self._client, self._config, self._serialize, self._deserialize) self.metadata = MetadataOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_version.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_version.py index dfa6ee022f15..e5754a47ce68 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_version.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b1" diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_configuration.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_configuration.py index c9c59af56698..26871fc0b530 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_configuration.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2022-01-01-preview" + self.api_version = "2022-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-securityinsight/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_security_insights.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_security_insights.py index 47cd3be5067c..97f9fe753e2e 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_security_insights.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_security_insights.py @@ -15,7 +15,7 @@ from .. import models from ._configuration import SecurityInsightsConfiguration -from .operations import ActionsOperations, AlertRuleTemplatesOperations, AlertRulesOperations, AutomationRulesOperations, BookmarkOperations, BookmarkRelationsOperations, BookmarksOperations, DataConnectorsCheckRequirementsOperations, DataConnectorsOperations, DomainWhoisOperations, EntitiesGetTimelineOperations, EntitiesOperations, EntitiesRelationsOperations, EntityQueriesOperations, EntityQueryTemplatesOperations, EntityRelationsOperations, IPGeodataOperations, IncidentCommentsOperations, IncidentRelationsOperations, IncidentsOperations, MetadataOperations, OfficeConsentsOperations, Operations, ProductSettingsOperations, SentinelOnboardingStatesOperations, SourceControlOperations, SourceControlsOperations, ThreatIntelligenceIndicatorMetricsOperations, ThreatIntelligenceIndicatorOperations, ThreatIntelligenceIndicatorsOperations, WatchlistItemsOperations, WatchlistsOperations +from .operations import ActionsOperations, AlertRuleTemplatesOperations, AlertRulesOperations, AutomationRulesOperations, BookmarkOperations, BookmarkRelationsOperations, BookmarksOperations, DataConnectorsCheckRequirementsOperations, DataConnectorsOperations, DomainWhoisOperations, EntitiesGetTimelineOperations, EntitiesOperations, EntitiesRelationsOperations, EntityQueriesOperations, EntityQueryTemplatesOperations, EntityRelationsOperations, FileImportsOperations, IPGeodataOperations, IncidentCommentsOperations, IncidentRelationsOperations, IncidentsOperations, MetadataOperations, OfficeConsentsOperations, Operations, ProductSettingsOperations, SentinelOnboardingStatesOperations, SourceControlOperations, SourceControlsOperations, ThreatIntelligenceIndicatorMetricsOperations, ThreatIntelligenceIndicatorOperations, ThreatIntelligenceIndicatorsOperations, WatchlistItemsOperations, WatchlistsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -61,6 +61,8 @@ class SecurityInsights: :ivar entity_query_templates: EntityQueryTemplatesOperations operations :vartype entity_query_templates: azure.mgmt.securityinsight.aio.operations.EntityQueryTemplatesOperations + :ivar file_imports: FileImportsOperations operations + :vartype file_imports: azure.mgmt.securityinsight.aio.operations.FileImportsOperations :ivar incident_comments: IncidentCommentsOperations operations :vartype incident_comments: azure.mgmt.securityinsight.aio.operations.IncidentCommentsOperations @@ -107,6 +109,8 @@ class SecurityInsights: :type subscription_id: str :param base_url: Service URL. Default value is 'https://management.azure.com'. :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -139,6 +143,7 @@ def __init__( self.entity_relations = EntityRelationsOperations(self._client, self._config, self._serialize, self._deserialize) self.entity_queries = EntityQueriesOperations(self._client, self._config, self._serialize, self._deserialize) self.entity_query_templates = EntityQueryTemplatesOperations(self._client, self._config, self._serialize, self._deserialize) + self.file_imports = FileImportsOperations(self._client, self._config, self._serialize, self._deserialize) self.incident_comments = IncidentCommentsOperations(self._client, self._config, self._serialize, self._deserialize) self.incident_relations = IncidentRelationsOperations(self._client, self._config, self._serialize, self._deserialize) self.metadata = MetadataOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/__init__.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/__init__.py index efbc70ef30fa..50d3a5a9347e 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/__init__.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/__init__.py @@ -22,6 +22,7 @@ from ._entity_relations_operations import EntityRelationsOperations from ._entity_queries_operations import EntityQueriesOperations from ._entity_query_templates_operations import EntityQueryTemplatesOperations +from ._file_imports_operations import FileImportsOperations from ._incident_comments_operations import IncidentCommentsOperations from ._incident_relations_operations import IncidentRelationsOperations from ._metadata_operations import MetadataOperations @@ -56,6 +57,7 @@ 'EntityRelationsOperations', 'EntityQueriesOperations', 'EntityQueryTemplatesOperations', + 'FileImportsOperations', 'IncidentCommentsOperations', 'IncidentRelationsOperations', 'MetadataOperations', diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_file_imports_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_file_imports_operations.py new file mode 100644 index 000000000000..14a01eaf1562 --- /dev/null +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_file_imports_operations.py @@ -0,0 +1,375 @@ +# 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 functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._file_imports_operations import build_create_request, build_delete_request_initial, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FileImportsOperations: + """FileImportsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.securityinsight.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.FileImportList"]: + """Gets all file imports. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param filter: Filters the results, based on a Boolean condition. Optional. + :type filter: str + :param orderby: Sorts the results. Optional. + :type orderby: str + :param top: Returns only the first n results. Optional. + :type top: int + :param skip_token: Skiptoken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skiptoken parameter that specifies a starting point to use for subsequent calls. Optional. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FileImportList or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.securityinsight.models.FileImportList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImportList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + filter=filter, + orderby=orderby, + top=top, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + filter=filter, + orderby=orderby, + top=top, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("FileImportList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any + ) -> "_models.FileImport": + """Gets a file import. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param file_import_id: File import ID. + :type file_import_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileImport, or the result of cls(response) + :rtype: ~azure.mgmt.securityinsight.models.FileImport + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImport"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileImport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore + + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + file_import: "_models.FileImport", + **kwargs: Any + ) -> "_models.FileImport": + """Creates the file import. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param file_import_id: File import ID. + :type file_import_id: str + :param file_import: The file import. + :type file_import: ~azure.mgmt.securityinsight.models.FileImport + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileImport, or the result of cls(response) + :rtype: ~azure.mgmt.securityinsight.models.FileImport + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImport"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(file_import, 'FileImport') + + request = build_create_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + content_type=content_type, + json=_json, + template_url=self.create.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileImport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore + + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any + ) -> Optional["_models.FileImport"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FileImport"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('FileImport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.FileImport"]: + """Delete the file import. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param file_import_id: File import ID. + :type file_import_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FileImport or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.securityinsight.models.FileImport] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImport"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FileImport', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py index ceebdbb68eb3..1abe77673055 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py @@ -151,6 +151,9 @@ from ._models_py3 import FileEntityProperties from ._models_py3 import FileHashEntity from ._models_py3 import FileHashEntityProperties +from ._models_py3 import FileImport +from ._models_py3 import FileImportList +from ._models_py3 import FileMetadata from ._models_py3 import FusionAlertRule from ._models_py3 import FusionAlertRuleTemplate from ._models_py3 import FusionScenarioExclusionPattern @@ -372,6 +375,7 @@ from ._models_py3 import UrlEntity from ._models_py3 import UrlEntityProperties from ._models_py3 import UserInfo +from ._models_py3 import ValidationError from ._models_py3 import Watchlist from ._models_py3 import WatchlistItem from ._models_py3 import WatchlistItemList @@ -401,6 +405,7 @@ DataConnectorKind, DataConnectorLicenseState, DataTypeState, + DeleteStatus, DeliveryAction, DeliveryLocation, DeploymentFetchStatus, @@ -410,18 +415,23 @@ EntityItemQueryKind, EntityKind, EntityMappingType, + EntityProviders, EntityQueryKind, EntityQueryTemplateKind, EntityTimelineKind, EntityType, Enum12, EventGroupingAggregationKind, + FileFormat, FileHashAlgorithm, + FileImportContentType, + FileImportState, IncidentClassification, IncidentClassificationReason, IncidentLabelType, IncidentSeverity, IncidentStatus, + IngestionMode, KillChainIntent, Kind, MatchingMethod, @@ -598,6 +608,9 @@ 'FileEntityProperties', 'FileHashEntity', 'FileHashEntityProperties', + 'FileImport', + 'FileImportList', + 'FileMetadata', 'FusionAlertRule', 'FusionAlertRuleTemplate', 'FusionScenarioExclusionPattern', @@ -819,6 +832,7 @@ 'UrlEntity', 'UrlEntityProperties', 'UserInfo', + 'ValidationError', 'Watchlist', 'WatchlistItem', 'WatchlistItemList', @@ -845,6 +859,7 @@ 'DataConnectorKind', 'DataConnectorLicenseState', 'DataTypeState', + 'DeleteStatus', 'DeliveryAction', 'DeliveryLocation', 'DeploymentFetchStatus', @@ -854,18 +869,23 @@ 'EntityItemQueryKind', 'EntityKind', 'EntityMappingType', + 'EntityProviders', 'EntityQueryKind', 'EntityQueryTemplateKind', 'EntityTimelineKind', 'EntityType', 'Enum12', 'EventGroupingAggregationKind', + 'FileFormat', 'FileHashAlgorithm', + 'FileImportContentType', + 'FileImportState', 'IncidentClassification', 'IncidentClassificationReason', 'IncidentLabelType', 'IncidentSeverity', 'IncidentStatus', + 'IngestionMode', 'KillChainIntent', 'Kind', 'MatchingMethod', diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_models_py3.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_models_py3.py index fa483026a0e8..0f1c191b8a15 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_models_py3.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_models_py3.py @@ -6740,8 +6740,8 @@ class EntityAnalytics(Settings): :ivar kind: Required. The kind of the setting.Constant filled by server. Possible values include: "Anomalies", "EyesOn", "EntityAnalytics", "Ueba". :vartype kind: str or ~azure.mgmt.securityinsight.models.SettingKind - :ivar is_enabled: Determines whether the setting is enable or disabled. - :vartype is_enabled: bool + :ivar entity_providers: The relevant entity providers that are synced. + :vartype entity_providers: list[str or ~azure.mgmt.securityinsight.models.EntityProviders] """ _validation = { @@ -6750,7 +6750,6 @@ class EntityAnalytics(Settings): 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'kind': {'required': True}, - 'is_enabled': {'readonly': True}, } _attribute_map = { @@ -6760,22 +6759,25 @@ class EntityAnalytics(Settings): 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'entity_providers': {'key': 'properties.entityProviders', 'type': '[str]'}, } def __init__( self, *, etag: Optional[str] = None, + entity_providers: Optional[List[Union[str, "EntityProviders"]]] = None, **kwargs ): """ :keyword etag: Etag of the azure resource. :paramtype etag: str + :keyword entity_providers: The relevant entity providers that are synced. + :paramtype entity_providers: list[str or ~azure.mgmt.securityinsight.models.EntityProviders] """ super(EntityAnalytics, self).__init__(etag=etag, **kwargs) self.kind = 'EntityAnalytics' # type: str - self.is_enabled = None + self.entity_providers = entity_providers class EntityEdges(msrest.serialization.Model): @@ -8069,6 +8071,225 @@ def __init__( self.hash_value = None +class FileImport(Resource): + """Represents a file import in Azure Security Insights. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.securityinsight.models.SystemData + :ivar ingestion_mode: Describes how to ingest the records in the file. Possible values include: + "IngestOnlyIfAllAreValid", "IngestAnyValidRecords", "Unspecified". + :vartype ingestion_mode: str or ~azure.mgmt.securityinsight.models.IngestionMode + :ivar content_type: The content type of this file. Possible values include: "BasicIndicator", + "StixIndicator", "Unspecified". + :vartype content_type: str or ~azure.mgmt.securityinsight.models.FileImportContentType + :ivar created_time_utc: The time the file was imported. + :vartype created_time_utc: ~datetime.datetime + :ivar error_file: Represents the error file (if the import was ingested with errors or failed + the validation). + :vartype error_file: ~azure.mgmt.securityinsight.models.FileMetadata + :ivar errors_preview: An ordered list of some of the errors that were encountered during + validation. + :vartype errors_preview: list[~azure.mgmt.securityinsight.models.ValidationError] + :ivar import_file: Represents the imported file. + :vartype import_file: ~azure.mgmt.securityinsight.models.FileMetadata + :ivar ingested_record_count: The number of records that have been successfully ingested. + :vartype ingested_record_count: int + :ivar source: The source for the data in the file. + :vartype source: str + :ivar state: The state of the file import. Possible values include: "FatalError", "Ingested", + "IngestedWithErrors", "InProgress", "Invalid", "WaitingForUpload", "Unspecified". + :vartype state: str or ~azure.mgmt.securityinsight.models.FileImportState + :ivar total_record_count: The number of records in the file. + :vartype total_record_count: int + :ivar valid_record_count: The number of records that have passed validation. + :vartype valid_record_count: int + :ivar files_valid_until_time_utc: The time the files associated with this import are deleted + from the storage account. + :vartype files_valid_until_time_utc: ~datetime.datetime + :ivar import_valid_until_time_utc: The time the file import record is soft deleted from the + database and history. + :vartype import_valid_until_time_utc: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'created_time_utc': {'readonly': True}, + 'error_file': {'readonly': True}, + 'errors_preview': {'readonly': True}, + 'ingested_record_count': {'readonly': True}, + 'state': {'readonly': True}, + 'total_record_count': {'readonly': True}, + 'valid_record_count': {'readonly': True}, + 'files_valid_until_time_utc': {'readonly': True}, + 'import_valid_until_time_utc': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'ingestion_mode': {'key': 'properties.ingestionMode', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'created_time_utc': {'key': 'properties.createdTimeUTC', 'type': 'iso-8601'}, + 'error_file': {'key': 'properties.errorFile', 'type': 'FileMetadata'}, + 'errors_preview': {'key': 'properties.errorsPreview', 'type': '[ValidationError]'}, + 'import_file': {'key': 'properties.importFile', 'type': 'FileMetadata'}, + 'ingested_record_count': {'key': 'properties.ingestedRecordCount', 'type': 'int'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'total_record_count': {'key': 'properties.totalRecordCount', 'type': 'int'}, + 'valid_record_count': {'key': 'properties.validRecordCount', 'type': 'int'}, + 'files_valid_until_time_utc': {'key': 'properties.filesValidUntilTimeUTC', 'type': 'iso-8601'}, + 'import_valid_until_time_utc': {'key': 'properties.importValidUntilTimeUTC', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + ingestion_mode: Optional[Union[str, "IngestionMode"]] = None, + content_type: Optional[Union[str, "FileImportContentType"]] = None, + import_file: Optional["FileMetadata"] = None, + source: Optional[str] = None, + **kwargs + ): + """ + :keyword ingestion_mode: Describes how to ingest the records in the file. Possible values + include: "IngestOnlyIfAllAreValid", "IngestAnyValidRecords", "Unspecified". + :paramtype ingestion_mode: str or ~azure.mgmt.securityinsight.models.IngestionMode + :keyword content_type: The content type of this file. Possible values include: + "BasicIndicator", "StixIndicator", "Unspecified". + :paramtype content_type: str or ~azure.mgmt.securityinsight.models.FileImportContentType + :keyword import_file: Represents the imported file. + :paramtype import_file: ~azure.mgmt.securityinsight.models.FileMetadata + :keyword source: The source for the data in the file. + :paramtype source: str + """ + super(FileImport, self).__init__(**kwargs) + self.ingestion_mode = ingestion_mode + self.content_type = content_type + self.created_time_utc = None + self.error_file = None + self.errors_preview = None + self.import_file = import_file + self.ingested_record_count = None + self.source = source + self.state = None + self.total_record_count = None + self.valid_record_count = None + self.files_valid_until_time_utc = None + self.import_valid_until_time_utc = None + + +class FileImportList(msrest.serialization.Model): + """List all the file imports. + + 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 next_link: URL to fetch the next set of file imports. + :vartype next_link: str + :ivar value: Required. Array of file imports. + :vartype value: list[~azure.mgmt.securityinsight.models.FileImport] + """ + + _validation = { + 'next_link': {'readonly': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[FileImport]'}, + } + + def __init__( + self, + *, + value: List["FileImport"], + **kwargs + ): + """ + :keyword value: Required. Array of file imports. + :paramtype value: list[~azure.mgmt.securityinsight.models.FileImport] + """ + super(FileImportList, self).__init__(**kwargs) + self.next_link = None + self.value = value + + +class FileMetadata(msrest.serialization.Model): + """Represents a file. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar file_format: The format of the file. Possible values include: "CSV", "JSON", + "Unspecified". + :vartype file_format: str or ~azure.mgmt.securityinsight.models.FileFormat + :ivar file_name: The name of the file. + :vartype file_name: str + :ivar file_size: The size of the file. + :vartype file_size: int + :ivar file_content_uri: A URI with a valid SAS token to allow uploading / downloading the file. + :vartype file_content_uri: str + :ivar delete_status: Indicates whether the file was deleted from the storage account. Possible + values include: "Deleted", "NotDeleted", "Unspecified". + :vartype delete_status: str or ~azure.mgmt.securityinsight.models.DeleteStatus + """ + + _validation = { + 'file_content_uri': {'readonly': True}, + 'delete_status': {'readonly': True}, + } + + _attribute_map = { + 'file_format': {'key': 'fileFormat', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'file_size': {'key': 'fileSize', 'type': 'int'}, + 'file_content_uri': {'key': 'fileContentUri', 'type': 'str'}, + 'delete_status': {'key': 'deleteStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + file_format: Optional[Union[str, "FileFormat"]] = None, + file_name: Optional[str] = None, + file_size: Optional[int] = None, + **kwargs + ): + """ + :keyword file_format: The format of the file. Possible values include: "CSV", "JSON", + "Unspecified". + :paramtype file_format: str or ~azure.mgmt.securityinsight.models.FileFormat + :keyword file_name: The name of the file. + :paramtype file_name: str + :keyword file_size: The size of the file. + :paramtype file_size: int + """ + super(FileMetadata, self).__init__(**kwargs) + self.file_format = file_format + self.file_name = file_name + self.file_size = file_size + self.file_content_uri = None + self.delete_status = None + + class FusionAlertRule(AlertRule): """Represents Fusion alert rule. @@ -10099,8 +10320,6 @@ def __init__( class IncidentOwnerInfo(msrest.serialization.Model): """Information on the user an incident is assigned to. - Variables are only populated by the server, and will be ignored when sending a request. - :ivar email: The email of the user the incident is assigned to. :vartype email: str :ivar assigned_to: The name of the user the incident is assigned to. @@ -10114,10 +10333,6 @@ class IncidentOwnerInfo(msrest.serialization.Model): :vartype owner_type: str or ~azure.mgmt.securityinsight.models.OwnerType """ - _validation = { - 'owner_type': {'readonly': True}, - } - _attribute_map = { 'email': {'key': 'email', 'type': 'str'}, 'assigned_to': {'key': 'assignedTo', 'type': 'str'}, @@ -10133,6 +10348,7 @@ def __init__( assigned_to: Optional[str] = None, object_id: Optional[str] = None, user_principal_name: Optional[str] = None, + owner_type: Optional[Union[str, "OwnerType"]] = None, **kwargs ): """ @@ -10144,13 +10360,16 @@ def __init__( :paramtype object_id: str :keyword user_principal_name: The user principal name of the user the incident is assigned to. :paramtype user_principal_name: str + :keyword owner_type: The type of the owner the incident is assigned to. Possible values + include: "Unknown", "User", "Group". + :paramtype owner_type: str or ~azure.mgmt.securityinsight.models.OwnerType """ super(IncidentOwnerInfo, self).__init__(**kwargs) self.email = email self.assigned_to = assigned_to self.object_id = object_id self.user_principal_name = user_principal_name - self.owner_type = None + self.owner_type = owner_type class IncidentPropertiesAction(msrest.serialization.Model): @@ -22141,6 +22360,41 @@ def __init__( self.object_id = object_id +class ValidationError(msrest.serialization.Model): + """Describes an error encountered in the file during validation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar record_index: The number of the record that has the error. + :vartype record_index: int + :ivar error_messages: A list of descriptions of the error. + :vartype error_messages: list[str] + """ + + _validation = { + 'error_messages': {'readonly': True}, + } + + _attribute_map = { + 'record_index': {'key': 'recordIndex', 'type': 'int'}, + 'error_messages': {'key': 'errorMessages', 'type': '[str]'}, + } + + def __init__( + self, + *, + record_index: Optional[int] = None, + **kwargs + ): + """ + :keyword record_index: The number of the record that has the error. + :paramtype record_index: int + """ + super(ValidationError, self).__init__(**kwargs) + self.record_index = record_index + self.error_messages = None + + class Watchlist(ResourceWithEtag): """Represents a Watchlist in Azure Security Insights. @@ -22385,9 +22639,9 @@ class WatchlistItem(ResourceWithEtag): :ivar updated_by: Describes a user that updated the watchlist item. :vartype updated_by: ~azure.mgmt.securityinsight.models.UserInfo :ivar items_key_value: key-value pairs for a watchlist item. - :vartype items_key_value: any + :vartype items_key_value: dict[str, any] :ivar entity_mapping: key-value pairs for a watchlist item entity mapping. - :vartype entity_mapping: any + :vartype entity_mapping: dict[str, any] """ _validation = { @@ -22411,8 +22665,8 @@ class WatchlistItem(ResourceWithEtag): 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, 'created_by': {'key': 'properties.createdBy', 'type': 'UserInfo'}, 'updated_by': {'key': 'properties.updatedBy', 'type': 'UserInfo'}, - 'items_key_value': {'key': 'properties.itemsKeyValue', 'type': 'object'}, - 'entity_mapping': {'key': 'properties.entityMapping', 'type': 'object'}, + 'items_key_value': {'key': 'properties.itemsKeyValue', 'type': '{object}'}, + 'entity_mapping': {'key': 'properties.entityMapping', 'type': '{object}'}, } def __init__( @@ -22427,8 +22681,8 @@ def __init__( updated: Optional[datetime.datetime] = None, created_by: Optional["UserInfo"] = None, updated_by: Optional["UserInfo"] = None, - items_key_value: Optional[Any] = None, - entity_mapping: Optional[Any] = None, + items_key_value: Optional[Dict[str, Any]] = None, + entity_mapping: Optional[Dict[str, Any]] = None, **kwargs ): """ @@ -22451,9 +22705,9 @@ def __init__( :keyword updated_by: Describes a user that updated the watchlist item. :paramtype updated_by: ~azure.mgmt.securityinsight.models.UserInfo :keyword items_key_value: key-value pairs for a watchlist item. - :paramtype items_key_value: any + :paramtype items_key_value: dict[str, any] :keyword entity_mapping: key-value pairs for a watchlist item entity mapping. - :paramtype entity_mapping: any + :paramtype entity_mapping: dict[str, any] """ super(WatchlistItem, self).__init__(etag=etag, **kwargs) self.watchlist_item_type = watchlist_item_type diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_security_insights_enums.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_security_insights_enums.py index 0cfb692aef18..a0a76b829a3d 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_security_insights_enums.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_security_insights_enums.py @@ -349,6 +349,17 @@ class DataTypeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): ENABLED = "Enabled" DISABLED = "Disabled" +class DeleteStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Indicates whether the file was deleted from the storage account. + """ + + #: The file was deleted. + DELETED = "Deleted" + #: The file was not deleted. + NOT_DELETED = "NotDeleted" + #: Unspecified. + UNSPECIFIED = "Unspecified" + class DeliveryAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The delivery action of this mail message like Delivered, Blocked, Replaced etc """ @@ -516,6 +527,13 @@ class EntityMappingType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Submission mail entity type. SUBMISSION_MAIL = "SubmissionMail" +class EntityProviders(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The entity provider that is synced. + """ + + ACTIVE_DIRECTORY = "ActiveDirectory" + AZURE_ACTIVE_DIRECTORY = "AzureActiveDirectory" + class EntityQueryKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The kind of the entity query """ @@ -600,6 +618,17 @@ class EventGroupingAggregationKind(with_metaclass(CaseInsensitiveEnumMeta, str, SINGLE_ALERT = "SingleAlert" ALERT_PER_RESULT = "AlertPerResult" +class FileFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The format of the file + """ + + #: A CSV file. + CSV = "CSV" + #: A JSON file. + JSON = "JSON" + #: A file of other format. + UNSPECIFIED = "Unspecified" + class FileHashAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The hash algorithm type. """ @@ -615,6 +644,37 @@ class FileHashAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: SHA256 Authenticode hash type. SHA256_AC = "SHA256AC" +class FileImportContentType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The content type of this file. + """ + + #: File containing records with the core fields of an indicator, plus the observables to construct + #: the STIX pattern. + BASIC_INDICATOR = "BasicIndicator" + #: File containing STIX indicators. + STIX_INDICATOR = "StixIndicator" + #: File containing other records. + UNSPECIFIED = "Unspecified" + +class FileImportState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the file import. + """ + + #: A fatal error has occurred while ingesting the file. + FATAL_ERROR = "FatalError" + #: The file has been ingested. + INGESTED = "Ingested" + #: The file has been ingested with errors. + INGESTED_WITH_ERRORS = "IngestedWithErrors" + #: The file ingestion is in progress. + IN_PROGRESS = "InProgress" + #: The file is invalid. + INVALID = "Invalid" + #: Waiting for the file to be uploaded. + WAITING_FOR_UPLOAD = "WaitingForUpload" + #: Unspecified state. + UNSPECIFIED = "Unspecified" + class IncidentClassification(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The reason the incident was closed """ @@ -674,6 +734,17 @@ class IncidentStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: A non-active incident. CLOSED = "Closed" +class IngestionMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes how to ingest the records in the file. + """ + + #: No records should be ingested when invalid records are detected. + INGEST_ONLY_IF_ALL_ARE_VALID = "IngestOnlyIfAllAreValid" + #: Valid records should still be ingested when invalid records are detected. + INGEST_ANY_VALID_RECORDS = "IngestAnyValidRecords" + #: Unspecified. + UNSPECIFIED = "Unspecified" + class KillChainIntent(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Holds the alert intent stage(s) mapping for this alert. """ diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py index efbc70ef30fa..50d3a5a9347e 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py @@ -22,6 +22,7 @@ from ._entity_relations_operations import EntityRelationsOperations from ._entity_queries_operations import EntityQueriesOperations from ._entity_query_templates_operations import EntityQueryTemplatesOperations +from ._file_imports_operations import FileImportsOperations from ._incident_comments_operations import IncidentCommentsOperations from ._incident_relations_operations import IncidentRelationsOperations from ._metadata_operations import MetadataOperations @@ -56,6 +57,7 @@ 'EntityRelationsOperations', 'EntityQueriesOperations', 'EntityQueryTemplatesOperations', + 'FileImportsOperations', 'IncidentCommentsOperations', 'IncidentRelationsOperations', 'MetadataOperations', diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_actions_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_actions_operations.py index 00ef5d0ac0bb..7c92c469c1b8 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_actions_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_actions_operations.py @@ -34,7 +34,7 @@ def build_list_by_alert_rule_request( rule_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions') @@ -72,7 +72,7 @@ def build_get_request( action_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}') @@ -116,7 +116,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}') @@ -159,7 +159,7 @@ def build_delete_request( action_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rule_templates_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rule_templates_operations.py index 354a59dd3e2b..49ee21b221ee 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rule_templates_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rule_templates_operations.py @@ -32,7 +32,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates') @@ -68,7 +68,7 @@ def build_get_request( alert_rule_template_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates/{alertRuleTemplateId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rules_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rules_operations.py index 3c7164fe0539..f263f4444136 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rules_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_alert_rules_operations.py @@ -33,7 +33,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules') @@ -69,7 +69,7 @@ def build_get_request( rule_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}') @@ -111,7 +111,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}') @@ -152,7 +152,7 @@ def build_delete_request( rule_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_automation_rules_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_automation_rules_operations.py index fb448400225d..0f8f6ae59ec1 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_automation_rules_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_automation_rules_operations.py @@ -34,7 +34,7 @@ def build_get_request( automation_rule_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}') @@ -76,7 +76,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}') @@ -117,7 +117,7 @@ def build_delete_request( automation_rule_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}') @@ -153,7 +153,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_operations.py index aaddca55bc74..2267577752a3 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_operations.py @@ -38,7 +38,7 @@ def build_expand_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/expand') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_relations_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_relations_operations.py index b32cb1b62e54..507717290c00 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_relations_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmark_relations_operations.py @@ -39,7 +39,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations') @@ -85,7 +85,7 @@ def build_get_request( relation_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}') @@ -129,7 +129,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}') @@ -172,7 +172,7 @@ def build_delete_request( relation_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmarks_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmarks_operations.py index b01107ed6433..88f84854f542 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmarks_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_bookmarks_operations.py @@ -33,7 +33,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks') @@ -69,7 +69,7 @@ def build_get_request( bookmark_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}') @@ -111,7 +111,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}') @@ -152,7 +152,7 @@ def build_delete_request( bookmark_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_check_requirements_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_check_requirements_operations.py index 14bb524776cc..eb1e1d3f6edd 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_check_requirements_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_check_requirements_operations.py @@ -37,7 +37,7 @@ def build_post_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_operations.py index 34a2ddb5d1fa..ba89109dff01 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_data_connectors_operations.py @@ -33,7 +33,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors') @@ -69,7 +69,7 @@ def build_get_request( data_connector_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}') @@ -111,7 +111,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}') @@ -152,7 +152,7 @@ def build_delete_request( data_connector_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}') @@ -194,7 +194,7 @@ def build_connect_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/connect') @@ -235,7 +235,7 @@ def build_disconnect_request( data_connector_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/disconnect') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_domain_whois_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_domain_whois_operations.py index 676cf58be8a8..8d1e09b07e9b 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_domain_whois_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_domain_whois_operations.py @@ -32,7 +32,7 @@ def build_get_request( domain: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/domain/whois/') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_get_timeline_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_get_timeline_operations.py index 4da418ba23cf..ce77997875dc 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_get_timeline_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_get_timeline_operations.py @@ -38,7 +38,7 @@ def build_list_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getTimeline') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_operations.py index f4f24dc3637a..bf767253cb66 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_operations.py @@ -33,7 +33,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities') @@ -69,7 +69,7 @@ def build_get_request( entity_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}') @@ -111,7 +111,7 @@ def build_expand_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/expand') @@ -154,7 +154,7 @@ def build_queries_request( kind: Union[str, "_models.EntityItemQueryKind"], **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/queries') @@ -197,7 +197,7 @@ def build_get_insights_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getInsights') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_relations_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_relations_operations.py index 898c408c51b6..c590c4e62c82 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_relations_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entities_relations_operations.py @@ -38,7 +38,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_queries_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_queries_operations.py index b51ff365430e..196ab715f04f 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_queries_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_queries_operations.py @@ -35,7 +35,7 @@ def build_list_request( kind: Optional[Union[str, "_models.Enum12"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries') @@ -73,7 +73,7 @@ def build_get_request( entity_query_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}') @@ -115,7 +115,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}') @@ -156,7 +156,7 @@ def build_delete_request( entity_query_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_query_templates_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_query_templates_operations.py index fb4339511615..59233c87f5f9 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_query_templates_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_query_templates_operations.py @@ -34,7 +34,7 @@ def build_list_request( kind: Optional[str] = "Activity", **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates') @@ -72,7 +72,7 @@ def build_get_request( entity_query_template_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates/{entityQueryTemplateId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_relations_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_relations_operations.py index 51792ecc83f3..72fe1bc9d6b8 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_relations_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_entity_relations_operations.py @@ -33,7 +33,7 @@ def build_get_relation_request( relation_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations/{relationName}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_file_imports_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_file_imports_operations.py new file mode 100644 index 000000000000..4b66328ff726 --- /dev/null +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_file_imports_operations.py @@ -0,0 +1,543 @@ +# 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 functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workspace_name: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2022-05-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = _SERIALIZER.query("orderby", orderby, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2022-05-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + "fileImportId": _SERIALIZER.url("file_import_id", file_import_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_request( + subscription_id: str, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + "fileImportId": _SERIALIZER.url("file_import_id", file_import_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id: str, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2022-05-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + "fileImportId": _SERIALIZER.url("file_import_id", file_import_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +class FileImportsOperations(object): + """FileImportsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.securityinsight.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.FileImportList"]: + """Gets all file imports. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param filter: Filters the results, based on a Boolean condition. Optional. + :type filter: str + :param orderby: Sorts the results. Optional. + :type orderby: str + :param top: Returns only the first n results. Optional. + :type top: int + :param skip_token: Skiptoken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skiptoken parameter that specifies a starting point to use for subsequent calls. Optional. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FileImportList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.securityinsight.models.FileImportList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImportList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + filter=filter, + orderby=orderby, + top=top, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + filter=filter, + orderby=orderby, + top=top, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("FileImportList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any + ) -> "_models.FileImport": + """Gets a file import. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param file_import_id: File import ID. + :type file_import_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileImport, or the result of cls(response) + :rtype: ~azure.mgmt.securityinsight.models.FileImport + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImport"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileImport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore + + + @distributed_trace + def create( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + file_import: "_models.FileImport", + **kwargs: Any + ) -> "_models.FileImport": + """Creates the file import. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param file_import_id: File import ID. + :type file_import_id: str + :param file_import: The file import. + :type file_import: ~azure.mgmt.securityinsight.models.FileImport + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileImport, or the result of cls(response) + :rtype: ~azure.mgmt.securityinsight.models.FileImport + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImport"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(file_import, 'FileImport') + + request = build_create_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + content_type=content_type, + json=_json, + template_url=self.create.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileImport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore + + + def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any + ) -> Optional["_models.FileImport"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FileImport"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('FileImport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + file_import_id: str, + **kwargs: Any + ) -> LROPoller["_models.FileImport"]: + """Delete the file import. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param file_import_id: File import ID. + :type file_import_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either FileImport or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.securityinsight.models.FileImport] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FileImport"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + file_import_id=file_import_id, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FileImport', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}'} # type: ignore diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_comments_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_comments_operations.py index f2b2677b2daf..cbc10d0a5552 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_comments_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_comments_operations.py @@ -39,7 +39,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments') @@ -85,7 +85,7 @@ def build_get_request( incident_comment_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}') @@ -129,7 +129,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}') @@ -172,7 +172,7 @@ def build_delete_request( incident_comment_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_relations_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_relations_operations.py index 0fc16b710278..47a3051ad6dd 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_relations_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_relations_operations.py @@ -39,7 +39,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations') @@ -85,7 +85,7 @@ def build_get_request( relation_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations/{relationName}') @@ -129,7 +129,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations/{relationName}') @@ -172,7 +172,7 @@ def build_delete_request( relation_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations/{relationName}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incidents_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incidents_operations.py index 7020c3d063b6..e5d250f38b5e 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incidents_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incidents_operations.py @@ -39,7 +39,7 @@ def build_run_playbook_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}/runPlaybook') @@ -84,7 +84,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents') @@ -128,7 +128,7 @@ def build_get_request( incident_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}') @@ -170,7 +170,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}') @@ -211,7 +211,7 @@ def build_delete_request( incident_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}') @@ -253,7 +253,7 @@ def build_create_team_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/createTeam') @@ -294,7 +294,7 @@ def build_list_alerts_request( incident_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/alerts') @@ -331,7 +331,7 @@ def build_list_bookmarks_request( incident_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/bookmarks') @@ -368,7 +368,7 @@ def build_list_entities_request( incident_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/entities') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_ip_geodata_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_ip_geodata_operations.py index c6c0166e2246..24a8e7586cb3 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_ip_geodata_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_ip_geodata_operations.py @@ -32,7 +32,7 @@ def build_get_request( ip_address: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/ip/geodata/') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_metadata_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_metadata_operations.py index 9d382342c203..1a15dd0ecfa2 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_metadata_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_metadata_operations.py @@ -38,7 +38,7 @@ def build_list_request( skip: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata') @@ -82,7 +82,7 @@ def build_get_request( metadata_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}') @@ -119,7 +119,7 @@ def build_delete_request( metadata_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}') @@ -161,7 +161,7 @@ def build_create_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}') @@ -207,7 +207,7 @@ def build_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_office_consents_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_office_consents_operations.py index 3ee6ace19cfb..ed4e92073fca 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_office_consents_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_office_consents_operations.py @@ -32,7 +32,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents') @@ -68,7 +68,7 @@ def build_get_request( consent_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}') @@ -105,7 +105,7 @@ def build_delete_request( consent_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_operations.py index 9e9091290da3..e30bd183869f 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_operations.py @@ -29,7 +29,7 @@ def build_list_request( **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/providers/Microsoft.SecurityInsights/operations') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_product_settings_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_product_settings_operations.py index ab81a9ddbd5a..66c79194f1cc 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_product_settings_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_product_settings_operations.py @@ -32,7 +32,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings') @@ -68,7 +68,7 @@ def build_get_request( settings_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}') @@ -105,7 +105,7 @@ def build_delete_request( settings_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}') @@ -147,7 +147,7 @@ def build_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_sentinel_onboarding_states_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_sentinel_onboarding_states_operations.py index 5a34592c2104..855b56eb7392 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_sentinel_onboarding_states_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_sentinel_onboarding_states_operations.py @@ -33,7 +33,7 @@ def build_get_request( sentinel_onboarding_state_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates/{sentinelOnboardingStateName}') @@ -75,7 +75,7 @@ def build_create_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates/{sentinelOnboardingStateName}') @@ -116,7 +116,7 @@ def build_delete_request( sentinel_onboarding_state_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates/{sentinelOnboardingStateName}') @@ -152,7 +152,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_control_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_control_operations.py index 9cf418d75cbf..6b6ec4ac7676 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_control_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_control_operations.py @@ -38,7 +38,7 @@ def build_list_repositories_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/listRepositories') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_controls_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_controls_operations.py index b65534263623..a4efe7e155a4 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_controls_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_source_controls_operations.py @@ -33,7 +33,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols') @@ -69,7 +69,7 @@ def build_get_request( source_control_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}') @@ -106,7 +106,7 @@ def build_delete_request( source_control_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}') @@ -148,7 +148,7 @@ def build_create_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_metrics_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_metrics_operations.py index b76ae48228e3..ac357983073f 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_metrics_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_metrics_operations.py @@ -31,7 +31,7 @@ def build_list_request( workspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/metrics') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_operations.py index 8508565fb26e..468cee1d3e85 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicator_operations.py @@ -38,7 +38,7 @@ def build_create_indicator_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/createIndicator') @@ -78,7 +78,7 @@ def build_get_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}') @@ -120,7 +120,7 @@ def build_create_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}') @@ -161,7 +161,7 @@ def build_delete_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}') @@ -202,7 +202,7 @@ def build_query_indicators_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/queryIndicators') @@ -247,7 +247,7 @@ def build_append_tags_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}/appendTags') @@ -293,7 +293,7 @@ def build_replace_tags_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}/replaceTags') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicators_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicators_operations.py index 7bd02dedd690..7bed9e67adde 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicators_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_threat_intelligence_indicators_operations.py @@ -37,7 +37,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlist_items_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlist_items_operations.py index 0a3b37239494..817dd12e7ef4 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlist_items_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlist_items_operations.py @@ -36,7 +36,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems') @@ -76,7 +76,7 @@ def build_get_request( watchlist_item_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems/{watchlistItemId}') @@ -115,7 +115,7 @@ def build_delete_request( watchlist_item_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems/{watchlistItemId}') @@ -159,7 +159,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems/{watchlistItemId}') diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlists_operations.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlists_operations.py index 228294423ebc..72580e39ba51 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlists_operations.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_watchlists_operations.py @@ -35,7 +35,7 @@ def build_list_request( skip_token: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists') @@ -73,7 +73,7 @@ def build_get_request( watchlist_alias: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}') @@ -110,7 +110,7 @@ def build_delete_request( watchlist_alias: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}') @@ -152,7 +152,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}')