@azure/arm-securityinsight 1.0.0-beta.2 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,12 +26,12 @@ function createsOrUpdatesAWatchlistItem() {
26
26
  const watchlistItem = {
27
27
  etag: "0300bf09-0000-0000-0000-5c37296e0000",
28
28
  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"
35
35
  }
36
36
  };
37
37
  const credential = new DefaultAzureCredential();
@@ -1 +1 @@
1
- {"version":3,"file":"watchlistItemsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/watchlistItemsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAiB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,8BAA8B;;QAC3C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,MAAM,CAAC;QACjC,MAAM,aAAa,GAAG,aAAa,CAAC;QACpC,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,eAAe,GAAG,sCAAsC,CAAC;QAC/D,MAAM,aAAa,GAAkB;YACnC,IAAI,EAAE,sCAAsC;YAC5C,aAAa,EAAE;gBACb,eAAe,EAAE,aAAa;gBAC9B,WAAW,EAAE,aAAa;gBAC1B,gBAAgB,EAAE,iBAAiB;gBACnC,gBAAgB,EAAE,aAAa;gBAC/B,gBAAgB,EAAE,cAAc;gBAChC,UAAU,EAAE,aAAa;aAC1B;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,cAAc,CACvD,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,8BAA8B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"watchlistItemsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/watchlistItemsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAiB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,8BAA8B;;QAC3C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,MAAM,CAAC;QACjC,MAAM,aAAa,GAAG,aAAa,CAAC;QACpC,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,eAAe,GAAG,sCAAsC,CAAC;QAC/D,MAAM,aAAa,GAAkB;YACnC,IAAI,EAAE,sCAAsC;YAC5C,aAAa,EAAE;gBACb,YAAY,EAAE,aAAa;gBAC3B,QAAQ,EAAE,aAAa;gBACvB,aAAa,EAAE,iBAAiB;gBAChC,YAAY,EAAE,aAAa;gBAC3B,YAAY,EAAE,cAAc;gBAC5B,OAAO,EAAE,aAAa;aACvB;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,cAAc,CACvD,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,8BAA8B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,6 +10,35 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { SecurityInsights } from "@azure/arm-securityinsight";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ /**
14
+ * 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.
15
+ *
16
+ * @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.
17
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItemsFromSasUri.json
18
+ */
19
+ function createOrUpdateAWatchlistAndBulkCreatesWatchlistItemsFromSalUri() {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const subscriptionId = "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0";
22
+ const resourceGroupName = "myRg";
23
+ const workspaceName = "myWorkspace";
24
+ const watchlistAlias = "highValueAsset";
25
+ const 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: "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",
33
+ sourceType: "Remote storage"
34
+ };
35
+ const credential = new DefaultAzureCredential();
36
+ const client = new SecurityInsights(credential, subscriptionId);
37
+ const result = yield client.watchlists.createOrUpdate(resourceGroupName, workspaceName, watchlistAlias, watchlist);
38
+ console.log(result);
39
+ });
40
+ }
41
+ createOrUpdateAWatchlistAndBulkCreatesWatchlistItemsFromSalUri().catch(console.error);
13
42
  /**
14
43
  * 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.
15
44
  *
@@ -1 +1 @@
1
- {"version":3,"file":"watchlistsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/watchlistsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAa,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAA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e;YACvB,UAAU,EAAE,YAAY;SACzB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,cAAc,CACnD,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,0BAA0B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"watchlistsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/watchlistsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAa,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,8DAA8D;;QAC3E,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,MAAM,CAAC;QACjC,MAAM,aAAa,GAAG,aAAa,CAAC;QACpC,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,SAAS,GAAc;YAC3B,WAAW,EAAE,oDAAoD;YACjE,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,wCAAwC;YAC9C,cAAc,EAAE,SAAS;YACzB,mBAAmB,EAAE,CAAC;YACtB,QAAQ,EAAE,WAAW;YACrB,MAAM,EACJ,mNAAmN;YACrN,UAAU,EAAE,gBAAgB;SAC7B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,UAAU,EAAE,cAAc,CAAC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;QACjC,MAAM,aAAa,GAAG,aAAa,CAAC;QACpC,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,SAAS,GAAc;YAC3B,WAAW,EAAE,4BAA4B;YACzC,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,wCAAwC;YAC9C,cAAc,EAAE,SAAS;YACzB,QAAQ,EAAE,WAAW;YACrB,MAAM,EAAE,eAAe;YACvB,UAAU,EAAE,YAAY;SACzB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,cAAc,CACnD,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,0BAA0B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -3557,12 +3557,19 @@ export declare type Watchlist = ResourceWithEtag & {
3557
3557
  numberOfLinesToSkip?: number;
3558
3558
  /** 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 */
3559
3559
  rawContent?: string;
3560
+ /** The Shared Access Signature (SAS) URI under which the large csv watchlist file is located and from which the watchlist and its items will be created */
3561
+ sasUri?: string;
3560
3562
  /** The search key is used to optimize query performance when using watchlists for joins with other data. For example, enable a column with IP addresses to be the designated SearchKey field, then use this field as the key field when joining to other event data by IP address. */
3561
3563
  itemsSearchKey?: string;
3562
3564
  /** The content type of the raw content. Example : text/csv or text/tsv */
3563
3565
  contentType?: string;
3564
3566
  /** The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted */
3565
3567
  uploadStatus?: string;
3568
+ /**
3569
+ * The provisioning state of the watchlist resource.
3570
+ * NOTE: This property will not be serialized. It can only be populated by the server.
3571
+ */
3572
+ readonly provisioningState?: ProvisioningState;
3566
3573
  };
3567
3574
  /** Represents a Watchlist item in Azure Security Insights. */
3568
3575
  export declare type WatchlistItem = ResourceWithEtag & {
@@ -3583,9 +3590,13 @@ export declare type WatchlistItem = ResourceWithEtag & {
3583
3590
  /** Describes a user that updated the watchlist item */
3584
3591
  updatedBy?: UserInfo;
3585
3592
  /** key-value pairs for a watchlist item */
3586
- itemsKeyValue?: Record<string, unknown>;
3593
+ itemsKeyValue?: {
3594
+ [propertyName: string]: any;
3595
+ };
3587
3596
  /** key-value pairs for a watchlist item entity mapping */
3588
- entityMapping?: Record<string, unknown>;
3597
+ entityMapping?: {
3598
+ [propertyName: string]: any;
3599
+ };
3589
3600
  };
3590
3601
  /** Data connector */
3591
3602
  export declare type DataConnector = ResourceWithEtag & {
@@ -6315,6 +6326,24 @@ export declare enum KnownSourceType {
6315
6326
  * **Remote storage**
6316
6327
  */
6317
6328
  export declare type SourceType = string;
6329
+ /** Known values of {@link ProvisioningState} that the service accepts. */
6330
+ export declare enum KnownProvisioningState {
6331
+ Succeeded = "Succeeded",
6332
+ Failed = "Failed",
6333
+ Canceled = "Canceled",
6334
+ InProgress = "InProgress"
6335
+ }
6336
+ /**
6337
+ * Defines values for ProvisioningState. \
6338
+ * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,
6339
+ * this enum contains the known values that the service supports.
6340
+ * ### Known values supported by the service
6341
+ * **Succeeded** \
6342
+ * **Failed** \
6343
+ * **Canceled** \
6344
+ * **InProgress**
6345
+ */
6346
+ export declare type ProvisioningState = string;
6318
6347
  /** Known values of {@link DataConnectorKind} that the service accepts. */
6319
6348
  export declare enum KnownDataConnectorKind {
6320
6349
  AzureActiveDirectory = "AzureActiveDirectory",