Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.SecurityInsights to add …
Browse files Browse the repository at this point in the history
…version preview/2019-01-01-preview (#10965)

* Update swagger for Watchlist public preview

* Suppress R4017

* Adjust numberOfLinesToSkip type

* Add type format to numberOfLinesToSkip

* numberOfLinesToSkip : adjust example

* Enhanced Put description
  • Loading branch information
hassanchawiche authored Nov 5, 2020
1 parent 9b24fde commit bfbfa7d
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3587,7 +3587,7 @@
"tags": [
"Watchlists"
],
"description": "Gets all watchlists.",
"description": "Gets all watchlists, without watchlist items.",
"operationId": "Watchlists_List",
"parameters": [
{
Expand Down Expand Up @@ -3625,51 +3625,6 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists": {
"get": {
"x-ms-examples": {
"Get all watchlists.": {
"$ref": "./examples/watchlists/GetWatchlists.json"
}
},
"tags": [
"Watchlists"
],
"description": "Gets all watchlists in a subscription.",
"operationId": "Watchlists_ListBySubscription",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/OperationalInsightsResourceProvider"
},
{
"$ref": "#/parameters/WorkspaceName"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/WatchlistList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}": {
"get": {
"x-ms-examples": {
Expand All @@ -3680,7 +3635,7 @@
"tags": [
"Watchlists"
],
"description": "Gets a watchlist.",
"description": "Gets a watchlist, without its watchlist items.",
"operationId": "Watchlists_Get",
"parameters": [
{
Expand Down Expand Up @@ -3772,7 +3727,7 @@
"tags": [
"Watchlists"
],
"description": "Creates a watchlist",
"description": "Creates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To create a Watchlist and its Items, we should call this endpoint twice : the first call will create am empty Watchlist, and the second one will create its Items.",
"operationId": "Watchlists_Create",
"parameters": [
{
Expand Down Expand Up @@ -10012,22 +9967,16 @@
"WatchlistProperties": {
"description": "Describes watchlist properties",
"properties": {
"createdTimeUtc": {
"description": "The time the watchlist was created",
"format": "date-time",
"watchlistId": {
"description": "The id (a Guid) of the watchlist",
"type": "string"
},
"createdBy": {
"$ref": "#/definitions/UserInfo",
"description": "Describes a user that created the watchlist",
"type": "object"
},
"displayName": {
"description": "The display name of the watchlist",
"type": "string"
},
"watchlistType": {
"description": "The type of the watchlist",
"provider": {
"description": "The provider of the watchlist",
"type": "string"
},
"source": {
Expand All @@ -10042,82 +9991,16 @@
"name": "source"
}
},
"provider": {
"description": "The provider of the watchlist",
"type": "string"
},
"description": {
"description": "A description of the watchlist",
"type": "string"
},
"tenantId": {
"description": "The tenantId where the watchlist belongs to.",
"type": "string"
},
"workspaceId": {
"description": "The workspaceId where the watchlist belongs to.",
"type": "string"
},
"labels": {
"description": "List of labels relevant to this watchlist",
"items": {
"$ref": "#/definitions/Label"
},
"type": "array"
},
"notes": {
"description": "The notes of the watchlist",
"created": {
"description": "The time the watchlist was created",
"format": "date-time",
"type": "string"
},
"lastUpdatedTimeUtc": {
"updated": {
"description": "The last time the watchlist was updated",
"format": "date-time",
"type": "string"
},
"updatedBy": {
"$ref": "#/definitions/UserInfo",
"description": "Describes a user that updated the watchlist",
"type": "object"
},
"defaultDuration": {
"description": "The default duration of a watchlist (in ISO 8601 duration format)",
"format": "duration",
"type": "string"
},
"watchlistItems": {
"description": "List of watchlist items.",
"items": {
"$ref": "#/definitions/WatchlistItem"
},
"type": "array"
}
},
"required": [
"displayName",
"source",
"provider"
],
"type": "object"
},
"WatchlistItem": {
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "Represents a Watchlist Item in Azure Security Insights.",
"properties": {
"properties": {
"$ref": "#/definitions/WatchlistItemProperties",
"description": "Watchlist item properties",
"x-ms-client-flatten": true
}
},
"type": "object"
},
"WatchlistItemProperties": {
"description": "Describes watchlist item properties",
"properties": {
"createdBy": {
"$ref": "#/definitions/UserInfo",
"description": "Describes a user that created the watchlist",
Expand All @@ -10128,49 +10011,56 @@
"description": "Describes a user that updated the watchlist",
"type": "object"
},
"watchlistItemName": {
"description": "Name of the watchlist item",
"description": {
"description": "A description of the watchlist",
"type": "string"
},
"watchlistItemPair": {
"description": "A key-value pair for a watchlist item",
"type": "object"
},
"entityMapping": {
"description": "A key-value pair for a watchlist item entity mapping",
"type": "object"
},
"tenantId": {
"description": "The tenantId to which this watchlist item belongs to",
"watchlistType": {
"description": "The type of the watchlist",
"type": "string"
},
"createdTimeUtc": {
"description": "The time the watchlist item was created",
"format": "date-time",
"watchlistAlias": {
"description": "The alias of the watchlist",
"type": "string"
},
"lastUpdatedTimeUtc": {
"description": "The last time the watchlist item was updated",
"format": "date-time",
"isDeleted": {
"description": "A flag that indicates if the watchlist is deleted or not",
"type": "boolean"
},
"labels": {
"description": "List of labels relevant to this watchlist",
"items": {
"$ref": "#/definitions/Label"
},
"type": "array"
},
"defaultDuration": {
"description": "The default duration of a watchlist (in ISO 8601 duration format)",
"format": "duration",
"type": "string"
},
"timeToLiveUtc": {
"description": "The time to live for the watchlist item",
"format": "date-time",
"tenantId": {
"description": "The tenantId where the watchlist belongs to",
"type": "string"
},
"watchlistItemType": {
"description": "The type of the watchlist item",
"numberOfLinesToSkip": {
"description": "The number of lines in a csv/tsv content to skip before the header",
"type": "integer",
"format": "int32"
},
"rawContent": {
"description": "The raw content that represents to watchlist items to create. In case of csv/tsv content type, it's the content of the file that will parsed by the endpoint",
"type": "string"
},
"watchlistId": {
"description": "The watchlist id of the parent of this watchlist item",
"contentType": {
"description": "The content type of the raw content. Example : text/csv or text/tsv ",
"type": "string"
}
},
"required": [
"watchlistId",
"watchlistItemPair"
"displayName",
"source",
"provider"
],
"type": "object"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@
"createdBy": {
"objectId": "2046feea-040d-4a46-9e2b-91c2941bfa70"
},
"updatedBy": {
"objectId": "2046feea-040d-4a46-9e2b-91c2941bfa70"
},
"lastUpdatedTimeUtc": "2019-01-01T13:15:30Z",
"createdTimeUtc": "2019-01-01T13:15:30Z",
"displayName": "High Value Assets Watchlist",
"watchlistType": "watchlist",
"source": "Local file",
"provider": "Azure Sentinel",
"description": "Watchlist Description",
"notes": "A note for the watchlist",
"provider": "Microsoft",
"description": "Watchlist from CSV content",
"labels": [
"Tag1",
"Tag2"
],
"defaultDuration": "P1D2H3M4S"
"defaultDuration": "P1279DT12H30M5S",
"numberOfLinesToSkip": 1,
"rawContent": "This line will be skipped\nheader1,header2\nvalue1,value2",
"contentType": "text/csv"
}
}
},
Expand All @@ -36,9 +32,15 @@
"body": {
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/watchlists/highValueAsset",
"name": "highValueAsset",
"type": "Microsoft.SecurityInsights/Watchlists",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"type": "Microsoft.SecurityInsights/Watchlists",
"properties": {
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
"objectId": "2046feea-040d-4a46-9e2b-91c2941bfa70",
"email": "[email protected]",
Expand All @@ -49,29 +51,32 @@
"email": "[email protected]",
"name": "john doe"
},
"lastUpdatedTimeUtc": "2019-01-01T13:15:30Z",
"createdTimeUtc": "2019-01-01T13:15:30Z",
"displayName": "High Value Assets Watchlist",
"description": "Watchlist from CSV content",
"watchlistType": "watchlist",
"source": "Local file",
"provider": "Azure Sentinel",
"description": "Watchlist Description",
"notes": "A note for the watchlist",
"watchlistAlias": "highValueAsset",
"isDeleted": false,
"labels": [
"Tag1",
"Tag2"
],
"defaultDuration": "P1D2H3M4S"
"defaultDuration": "P1279DT12H30M5S",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd"
}
}
},
"201": {
"body": {
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/watchlists/highValueAsset",
"name": "highValueAsset",
"type": "Microsoft.SecurityInsights/Watchlists",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"type": "Microsoft.SecurityInsights/Watchlists",
"properties": {
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
"objectId": "2046feea-040d-4a46-9e2b-91c2941bfa70",
"email": "[email protected]",
Expand All @@ -82,19 +87,16 @@
"email": "[email protected]",
"name": "john doe"
},
"lastUpdatedTimeUtc": "2019-01-01T13:15:30Z",
"createdTimeUtc": "2019-01-01T13:15:30Z",
"displayName": "High Value Assets Watchlist",
"description": "Watchlist from CSV content",
"watchlistType": "watchlist",
"source": "Local file",
"provider": "Azure Sentinel",
"description": "Watchlist Description",
"notes": "A note for the watchlist",
"watchlistAlias": "highValueAsset",
"isDeleted": false,
"labels": [
"Tag1",
"Tag2"
],
"defaultDuration": "P1D2H3M4S"
"defaultDuration": "P1279DT12H30M5S",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalIinsights",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"watchlistAlias": "highValueAsset"
},
"responses": {
Expand Down
Loading

0 comments on commit bfbfa7d

Please sign in to comment.