Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-securityinsight] Bug Fix: Correcting sourceType field for 2022-01-01-preview API version for Watchlist #9919

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/securityinsight/azure-mgmt-securityinsight/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "e432d9cc87bfed320d8feead4b448be9481c9181",
"commit": "6214fa3c3c9497e45fd6c632e1c0cb6e8e2934be",
"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/[email protected] --use=@autorest/[email protected] --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/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/securityinsights/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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-04-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 Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2022-01-01-preview",
"total_api_version_list": ["2022-01-01-preview"],
"chosen_version": "2022-04-01-preview",
"total_api_version_list": ["2022-04-01-preview"],
"client": {
"name": "SecurityInsights",
"filename": "_security_insights",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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-04-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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@
EntityItemQueryKind,
EntityKind,
EntityMappingType,
EntityProviders,
EntityQueryKind,
EntityQueryTemplateKind,
EntityTimelineKind,
Expand Down Expand Up @@ -854,6 +855,7 @@
'EntityItemQueryKind',
'EntityKind',
'EntityMappingType',
'EntityProviders',
'EntityQueryKind',
'EntityQueryTemplateKind',
'EntityTimelineKind',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -6750,7 +6750,6 @@ class EntityAnalytics(Settings):
'type': {'readonly': True},
'system_data': {'readonly': True},
'kind': {'required': True},
'is_enabled': {'readonly': True},
}

_attribute_map = {
Expand All @@ -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):
Expand Down Expand Up @@ -10099,8 +10101,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.
Expand All @@ -10114,10 +10114,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'},
Expand All @@ -10133,6 +10129,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
):
"""
Expand All @@ -10144,13 +10141,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):
Expand Down Expand Up @@ -22385,9 +22385,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 = {
Expand All @@ -22411,8 +22411,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__(
Expand All @@ -22427,8 +22427,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
):
"""
Expand All @@ -22451,9 +22451,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-04-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')
Expand Down Expand Up @@ -72,7 +72,7 @@ def build_get_request(
action_id: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down Expand Up @@ -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-04-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}')
Expand Down Expand Up @@ -159,7 +159,7 @@ def build_delete_request(
action_id: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def build_list_request(
workspace_name: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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')
Expand Down Expand Up @@ -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-04-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}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def build_list_request(
workspace_name: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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')
Expand Down Expand Up @@ -69,7 +69,7 @@ def build_get_request(
rule_id: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down Expand Up @@ -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-04-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}')
Expand Down Expand Up @@ -152,7 +152,7 @@ def build_delete_request(
rule_id: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build_get_request(
automation_rule_id: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down Expand Up @@ -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-04-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}')
Expand Down Expand Up @@ -117,7 +117,7 @@ def build_delete_request(
automation_rule_id: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down Expand Up @@ -153,7 +153,7 @@ def build_list_request(
workspace_name: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-04-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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-04-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')
Expand Down Expand Up @@ -85,7 +85,7 @@ def build_get_request(
relation_name: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down Expand Up @@ -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-04-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}')
Expand Down Expand Up @@ -172,7 +172,7 @@ def build_delete_request(
relation_name: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2022-01-01-preview"
api_version = "2022-04-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}')
Expand Down
Loading