Skip to content

Commit 7b2afec

Browse files
authored
securityinsights-track2-release (Azure#21895)
1 parent 7592071 commit 7b2afec

File tree

15 files changed

+777
-567
lines changed

15 files changed

+777
-567
lines changed

sdk/securityinsight/arm-securityinsight/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Release History
22

3+
## 1.0.0-beta.3 (2022-05-16)
4+
5+
**Features**
6+
7+
- Added Type Alias ProvisioningState
8+
- Type Alias Watchlist has a new parameter sasUri
9+
- Type Alias Watchlist has a new parameter provisioningState
10+
- Added Enum KnownProvisioningState
11+
12+
**Breaking Changes**
13+
14+
- Type Alias WatchlistItem no longer has parameter itemsKeyValue
15+
- Type Alias WatchlistItem no longer has parameter entityMapping
16+
17+
318
## 1.0.0-beta.2 (2022-03-17)
419

520
**Features**
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "3124311bc9791b64a8fa8fe8dc6372fb19559a1a",
2+
"commit": "057c69f5ed2f893c34944e9bfba3e303d49f64bc",
33
"readme": "specification/securityinsights/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\securityinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.16 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\securityinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.1.2",
7-
"use": "@autorest/typescript@6.0.0-beta.16"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
7+
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
88
}

sdk/securityinsight/arm-securityinsight/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for SecurityInsights.",
6-
"version": "1.0.0-beta.2",
6+
"version": "1.0.0-beta.3",
77
"engines": {
88
"node": ">=12.0.0"
99
},
1010
"dependencies": {
1111
"@azure/core-paging": "^1.2.0",
12-
"@azure/core-client": "^1.0.0",
12+
"@azure/core-client": "^1.5.0",
1313
"@azure/core-auth": "^1.3.0",
14-
"@azure/core-rest-pipeline": "^1.1.0",
14+
"@azure/core-rest-pipeline": "^1.8.0",
1515
"tslib": "^2.2.0"
1616
},
1717
"keywords": [

sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,6 +3027,18 @@ export enum KnownProviderName {
30273027
MicrosoftOperationalInsightsWorkspacesSharedKeys = "Microsoft.OperationalInsights/workspaces/sharedKeys"
30283028
}
30293029

3030+
// @public
3031+
export enum KnownProvisioningState {
3032+
// (undocumented)
3033+
Canceled = "Canceled",
3034+
// (undocumented)
3035+
Failed = "Failed",
3036+
// (undocumented)
3037+
InProgress = "InProgress",
3038+
// (undocumented)
3039+
Succeeded = "Succeeded"
3040+
}
3041+
30303042
// @public
30313043
export enum KnownRegistryHive {
30323044
HkeyA = "HKEY_A",
@@ -4033,6 +4045,9 @@ export type PropertyConditionProperties = AutomationRuleCondition & {
40334045
// @public
40344046
export type ProviderName = string;
40354047

4048+
// @public
4049+
export type ProvisioningState = string;
4050+
40364051
// @public
40374052
export interface QueryBasedAlertRuleTemplateProperties {
40384053
alertDetailsOverride?: AlertDetailsOverride;
@@ -5132,9 +5147,11 @@ export type Watchlist = ResourceWithEtag & {
51325147
tenantId?: string;
51335148
numberOfLinesToSkip?: number;
51345149
rawContent?: string;
5150+
sasUri?: string;
51355151
itemsSearchKey?: string;
51365152
contentType?: string;
51375153
uploadStatus?: string;
5154+
readonly provisioningState?: ProvisioningState;
51385155
};
51395156

51405157
// @public
@@ -5147,8 +5164,12 @@ export type WatchlistItem = ResourceWithEtag & {
51475164
updated?: Date;
51485165
createdBy?: UserInfo;
51495166
updatedBy?: UserInfo;
5150-
itemsKeyValue?: Record<string, unknown>;
5151-
entityMapping?: Record<string, unknown>;
5167+
itemsKeyValue?: {
5168+
[propertyName: string]: any;
5169+
};
5170+
entityMapping?: {
5171+
[propertyName: string]: any;
5172+
};
51525173
};
51535174

51545175
// @public

sdk/securityinsight/arm-securityinsight/samples-dev/watchlistItemsCreateOrUpdateSample.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ async function createsOrUpdatesAWatchlistItem() {
2626
const watchlistItem: WatchlistItem = {
2727
etag: "0300bf09-0000-0000-0000-5c37296e0000",
2828
itemsKeyValue: {
29-
"Business tier": "10.0.2.0/24",
30-
"Data tier": "10.0.2.0/24",
31-
"Gateway subnet": "10.0.255.224/27",
32-
"Private DMZ in": "10.0.0.0/27",
33-
"Public DMZ out": "10.0.0.96/27",
34-
"Web Tier": "10.0.1.0/24"
29+
businessTier: "10.0.2.0/24",
30+
dataTier: "10.0.2.0/24",
31+
gatewaySubnet: "10.0.255.224/27",
32+
privateDmzIn: "10.0.0.0/27",
33+
publicDmzOut: "10.0.0.96/27",
34+
webTier: "10.0.1.0/24"
3535
}
3636
};
3737
const credential = new DefaultAzureCredential();

sdk/securityinsight/arm-securityinsight/samples-dev/watchlistsCreateOrUpdateSample.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,43 @@
1111
import { Watchlist, SecurityInsights } from "@azure/arm-securityinsight";
1212
import { DefaultAzureCredential } from "@azure/identity";
1313

14+
/**
15+
* This sample demonstrates how to Create or update 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 with either rawContent or a valid SAR URI and contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing such large file can be polled through the URL returned in Azure-AsyncOperation header.
16+
*
17+
* @summary Create or update 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 with either rawContent or a valid SAR URI and contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing such large file can be polled through the URL returned in Azure-AsyncOperation header.
18+
* x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItemsFromSasUri.json
19+
*/
20+
async function createOrUpdateAWatchlistAndBulkCreatesWatchlistItemsFromSalUri() {
21+
const subscriptionId = "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0";
22+
const resourceGroupName = "myRg";
23+
const workspaceName = "myWorkspace";
24+
const watchlistAlias = "highValueAsset";
25+
const watchlist: Watchlist = {
26+
description: "Watchlist from a large CSV file under Blob storage",
27+
displayName: "High Value Assets Watchlist",
28+
etag: '"0300bf09-0000-0000-0000-5c37296e0000"',
29+
itemsSearchKey: "header1",
30+
numberOfLinesToSkip: 1,
31+
provider: "Microsoft",
32+
sasUri:
33+
"https://storagesample.blob.core.windows.net/sample-contaier/sampleBlob.csv?sp=r&st=2021-09-24T01:15:52Z&se=2021-10-01T09:15:52Z&spr=https&sv=2020-08-04&sr=b&sig=HRRRMc43ZJz634eBc402X%2FFPxam5sZVPSkLOY14baEd%4Z",
34+
sourceType: "Remote storage"
35+
};
36+
const credential = new DefaultAzureCredential();
37+
const client = new SecurityInsights(credential, subscriptionId);
38+
const result = await client.watchlists.createOrUpdate(
39+
resourceGroupName,
40+
workspaceName,
41+
watchlistAlias,
42+
watchlist
43+
);
44+
console.log(result);
45+
}
46+
47+
createOrUpdateAWatchlistAndBulkCreatesWatchlistItemsFromSalUri().catch(
48+
console.error
49+
);
50+
1451
/**
1552
* This sample demonstrates how to Create or update 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 with either rawContent or a valid SAR URI and contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing such large file can be polled through the URL returned in Azure-AsyncOperation header.
1653
*

0 commit comments

Comments
 (0)