Skip to content

Commit

Permalink
CodeGen from PR 16933 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Microsoft.SecurityInsights 2021-09-01-preview (Azure#16933)

* Adds base for updating Microsoft.SecurityInsights from version preview/2021-03-01-preview to version 2021-09-01-preview

* Updates readme

* Updates API version in new specs and examples

* Microsoft.security insights 2021 09 01 preview add missing resources (Azure#15531)

* Copy missing resources specs and examples from 2019-01-01-preview

* Update added resources specs and examples and extract common types

* Update readme

* Extract ClientInfo, UserInfo and Lable to common types

* Fix SpellCheck and Avocado

* Return ThreatIntelligence to readme

* Fix broken refs in Watchlists

* Resolve duplicate schema errors

* Run prettier

* Make common types prettier

* Add required property to operations according to ARM requirments

* Fix readme

* Add file separators to readme

* Rename example file

* Supress OBJECT_ADDITIONAL_PROPERTIES

* Add 'where' to OBJECT_ADDITIONAL_PROPERTIES supression

* Move OBJECT_ADDITIONAL_PROPERTIES supression under general Supression section.

* Copy dataConnectors from 2021-03-01-preview

* Update version of dataConnectors (this was done as there were errors when trying to generate C# client. Copying and changing version again fixed the problem).

* Add dataConnectorsCheckRequirments path, parameters and definitions from 2019-01-01-preveiw

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Use newest common types in new 2021-09-01-preview API version (Azure#15778)

* Use newest common types in AlertRules

* Use newest common types in AutomationRules

* Use newest common types in Bookmarks

* Use newest common types in dataConnectors

* Use newest common types in Enrichment

* Use newest common types in Entities

* Use newest common types in EntityQueries

* Use newest common types in Incidents

* Use newest common types in Metadata

* Use newest common types in OfficeConsents

* Use newest common types in OnboardingStates

* Use newest common types in operations

* Use newest common types in Settings

* Use newest common types in SourceControls

* Use newest common types in ThreatIntelligence

* Use newest common types in Watchlist

* Use newest common types in EntityTypes

* Use newest common types in RelationTypes

* Fix ThreatIntelligence

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add template version to the scheduled alert rule + scheduled template (Azure#15919)

* Add template version to the scheduled alert rule

* Update AlertRules.json

* Update AlertRules.json

* Update AlertRules.json

* Update AlertRules.json

* Update GetAlertRuleTemplates.json

* Update GetAlertRuleTemplateById.json

* add aws s3 connector (Azure#15844)

* Add a new kind of alert rules - NRT (Azure#15980)

* add NRT rule

* add NRT rule

* add NRT rule

* add NRT rule

* fix typo

* fix typo

* fix

* Align new Metadata feature with 2021-03-01-preview (Azure#16304)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add fixes from 2021-03-01-preview (Azure#16238)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add entity query templates (Azure#16269)

* Add entity query templates from 2021-03-01-preview

* Update version

* Use newest common types and update readme

* Fix conflicting common types

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Fix bookmark relations operatinIds to be consistent with other operationIds. (Azure#16519)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add corrections from 2021-03-01-preview (Azure#16490)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Remove unused parameters (Azure#16619)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Update readme default readme tag for client generation (Azure#16620)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Use CloudError instead of ErrorResponse to avoid breaking change (Azure#16691)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add data connectors polling ccp api support (Azure#16293)

* adding dataConnectors polling CCP api Support. (witout tests validations)

* azure sentinel dataconnectors update examples

* azure sentinel dataConnectors examples update and fix

* azure sentinel dataConnectors prettier

* azure sentinel dataConnectors add connect disconnect examples update path

* azure sentinel dataConnectors add connect disconnect examples fix

* azure sentinel dataConnectors add connect disconnect examples fix 2

* azure sentinel dataConnectors rebase dataConnectors dev

* azure sentinel dataconnectors - fix put to post on connect and disconnect endpoints

* azure sentinel dataconnectors - adding x-ms-secret to password on connect

* azure sentinel dataconnectors - connect/disconnect endpoint remove unnedded 201 return

* azure sentinel dataConnectors - remove empty body DataConnectorDisconnectBody

Co-authored-by: Alon Danoch <adanoch@microsoft.com>

* Add office IRM Connector (Azure#16764)

* Add office IRM

* fix

* fix

* fix

* fix

Co-authored-by: omerhaimov <omer.haimovich@gmail.com>

* Add teamInformation to IncidentProperties 2021-09-01-preview (Azure#16787)

* Fix Swagger for SecurityInsights - Add teamInformation to IncidentProperties

* Try change description as advised by Swagger reviewer Yuchao Yan to fix the validation error.

* Revert change in ntDomain description as it has nothing to do with validations

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Make CloudError and CloudErrorBody external resources (already exist under Microsoft.Rest.Azure namespace) (Azure#16872)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Remove operational insights parameter 2021 09 01 preview (Azure#16891)

* Remove operationalInsightsResourceProvider parameter from specs

* Remove parameter from examples

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Update EntityTypes.json (Azure#16972)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>
Co-authored-by: Amit Bergman <38046493+Amitbergman@users.noreply.github.com>
Co-authored-by: sagamzu <52034287+sagamzu@users.noreply.github.com>
Co-authored-by: necoh <53861229+necoh@users.noreply.github.com>
Co-authored-by: alondanoch <alondanoch@hotmail.com>
Co-authored-by: Alon Danoch <adanoch@microsoft.com>
Co-authored-by: omerhaimov <55688621+omerhaimov@users.noreply.github.com>
Co-authored-by: omerhaimov <omer.haimovich@gmail.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
  • Loading branch information
10 people committed Dec 9, 2021
1 parent 4db8247 commit 82a1f69
Show file tree
Hide file tree
Showing 81 changed files with 59,330 additions and 5,397 deletions.
11 changes: 11 additions & 0 deletions sdk/securityinsight/azure-mgmt-securityinsight/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "85d11472e0e6d69603edb824b40f5fee71e87d2d",
"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/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/securityinsights/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
__version__ = VERSION
__all__ = ['SecurityInsights']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

Expand All @@ -29,7 +29,7 @@ class SecurityInsightsConfiguration(Configuration):
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Azure subscription ID.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""

Expand All @@ -40,15 +40,15 @@ def __init__(
**kwargs # type: Any
):
# type: (...) -> None
super(SecurityInsightsConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(SecurityInsightsConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-01-01"
self.api_version = "2021-09-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)
Expand All @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
@@ -1,67 +1,133 @@
{
"chosen_version": "2020-01-01",
"total_api_version_list": ["2020-01-01"],
"chosen_version": "2021-09-01-preview",
"total_api_version_list": ["2021-09-01-preview"],
"client": {
"name": "SecurityInsights",
"filename": "_security_insights",
"description": "API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"host_value": "\"https://management.azure.com\"",
"parameterized_host_template": null,
"azure_arm": true,
"has_lro_operations": false
"has_lro_operations": false,
"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\"]}}}"
},
"global_parameters": {
"sync_method": {
"sync": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"description": "Azure subscription ID.",
"signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"async": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"description": "Azure subscription ID.",
"signature": "subscription_id: str,",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=\"https://management.azure.com\", # type: str",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: str = \"https://management.azure.com\",",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
"credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
"credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"operations": "Operations",
"alert_rules": "AlertRulesOperations",
"actions": "ActionsOperations",
"alert_rule_templates": "AlertRuleTemplatesOperations",
"automation_rules": "AutomationRulesOperations",
"bookmarks": "BookmarksOperations",
"data_connectors": "DataConnectorsOperations",
"bookmark_relations": "BookmarkRelationsOperations",
"bookmark": "BookmarkOperations",
"ip_geodata": "IPGeodataOperations",
"domain_whois": "DomainWhoisOperations",
"entity_queries": "EntityQueriesOperations",
"entities": "EntitiesOperations",
"entities_get_timeline": "EntitiesGetTimelineOperations",
"entities_relations": "EntitiesRelationsOperations",
"entity_relations": "EntityRelationsOperations",
"incidents": "IncidentsOperations",
"incident_comments": "IncidentCommentsOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
"incident_comments": "IncidentCommentsOperations",
"incident_relations": "IncidentRelationsOperations",
"metadata": "MetadataOperations",
"sentinel_onboarding_states": "SentinelOnboardingStatesOperations",
"product_settings": "ProductSettingsOperations",
"source_control": "SourceControlOperations",
"source_controls": "SourceControlsOperations",
"watchlists": "WatchlistsOperations",
"watchlist_items": "WatchlistItemsOperations",
"data_connectors": "DataConnectorsOperations",
"data_connectors_check_requirements": "DataConnectorsCheckRequirementsOperations",
"threat_intelligence_indicator": "ThreatIntelligenceIndicatorOperations",
"threat_intelligence_indicators": "ThreatIntelligenceIndicatorsOperations",
"threat_intelligence_indicator_metrics": "ThreatIntelligenceIndicatorMetricsOperations",
"operations": "Operations",
"office_consents": "OfficeConsentsOperations",
"entity_query_templates": "EntityQueryTemplatesOperations"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# --------------------------------------------------------------------------

# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
pass
Loading

0 comments on commit 82a1f69

Please sign in to comment.