@googleapis/chromemanagement 25.2.0 → 26.0.0
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.
- package/CHANGELOG.md +11 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1.d.ts +276 -0
- package/build/v1.js +119 -0
- package/build/v1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +552 -0
package/v1.ts
CHANGED
|
@@ -2518,6 +2518,15 @@ export namespace chromemanagement_v1 {
|
|
|
2518
2518
|
*/
|
|
2519
2519
|
subjectPublicKeyInfo?: string | null;
|
|
2520
2520
|
}
|
|
2521
|
+
/**
|
|
2522
|
+
* Response from checking the enablement status of insights for the customer.
|
|
2523
|
+
*/
|
|
2524
|
+
export interface Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse {
|
|
2525
|
+
/**
|
|
2526
|
+
* The state of the insights feature.
|
|
2527
|
+
*/
|
|
2528
|
+
insightsState?: string | null;
|
|
2529
|
+
}
|
|
2521
2530
|
/**
|
|
2522
2531
|
* A representation of a Chrome browser profile.
|
|
2523
2532
|
*/
|
|
@@ -2904,6 +2913,37 @@ export namespace chromemanagement_v1 {
|
|
|
2904
2913
|
*/
|
|
2905
2914
|
urlMatchers?: string[] | null;
|
|
2906
2915
|
}
|
|
2916
|
+
/**
|
|
2917
|
+
* Request to disable insights for the customer.
|
|
2918
|
+
*/
|
|
2919
|
+
export interface Schema$GoogleChromeManagementVersionsV1DisableInsightsRequest {}
|
|
2920
|
+
/**
|
|
2921
|
+
* Response from disabling insights for the customer.
|
|
2922
|
+
*/
|
|
2923
|
+
export interface Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse {
|
|
2924
|
+
/**
|
|
2925
|
+
* The state of the insights feature.
|
|
2926
|
+
*/
|
|
2927
|
+
insightsState?: string | null;
|
|
2928
|
+
}
|
|
2929
|
+
/**
|
|
2930
|
+
* Request to enable insights for the customer.
|
|
2931
|
+
*/
|
|
2932
|
+
export interface Schema$GoogleChromeManagementVersionsV1EnableInsightsRequest {
|
|
2933
|
+
/**
|
|
2934
|
+
* Optional. The Organizational Units to set up required connectors for. Organizational Units are provided as paths relative to root. If this field is not set, connectors will be set up at root OU (as if it were set to ["/"]). Example: ["/corp/sales", "/eng"]
|
|
2935
|
+
*/
|
|
2936
|
+
targetOus?: string[] | null;
|
|
2937
|
+
}
|
|
2938
|
+
/**
|
|
2939
|
+
* Response from enabling insights for the customer.
|
|
2940
|
+
*/
|
|
2941
|
+
export interface Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse {
|
|
2942
|
+
/**
|
|
2943
|
+
* The state of the insights feature.
|
|
2944
|
+
*/
|
|
2945
|
+
insightsState?: string | null;
|
|
2946
|
+
}
|
|
2907
2947
|
/**
|
|
2908
2948
|
* Describes a generic Certificate Authority Connection.
|
|
2909
2949
|
*/
|
|
@@ -3467,6 +3507,7 @@ export namespace chromemanagement_v1 {
|
|
|
3467
3507
|
apps: Resource$Customers$Apps;
|
|
3468
3508
|
certificateProvisioningProcesses: Resource$Customers$Certificateprovisioningprocesses;
|
|
3469
3509
|
connectorConfigs: Resource$Customers$Connectorconfigs;
|
|
3510
|
+
enterprise: Resource$Customers$Enterprise;
|
|
3470
3511
|
profiles: Resource$Customers$Profiles;
|
|
3471
3512
|
reports: Resource$Customers$Reports;
|
|
3472
3513
|
telemetry: Resource$Customers$Telemetry;
|
|
@@ -3479,6 +3520,7 @@ export namespace chromemanagement_v1 {
|
|
|
3479
3520
|
this.connectorConfigs = new Resource$Customers$Connectorconfigs(
|
|
3480
3521
|
this.context
|
|
3481
3522
|
);
|
|
3523
|
+
this.enterprise = new Resource$Customers$Enterprise(this.context);
|
|
3482
3524
|
this.profiles = new Resource$Customers$Profiles(this.context);
|
|
3483
3525
|
this.reports = new Resource$Customers$Reports(this.context);
|
|
3484
3526
|
this.telemetry = new Resource$Customers$Telemetry(this.context);
|
|
@@ -6427,6 +6469,516 @@ export namespace chromemanagement_v1 {
|
|
|
6427
6469
|
requestBody?: Schema$GoogleChromeManagementVersionsV1ConnectorConfig;
|
|
6428
6470
|
}
|
|
6429
6471
|
|
|
6472
|
+
export class Resource$Customers$Enterprise {
|
|
6473
|
+
context: APIRequestContext;
|
|
6474
|
+
securityInsights: Resource$Customers$Enterprise$Securityinsights;
|
|
6475
|
+
constructor(context: APIRequestContext) {
|
|
6476
|
+
this.context = context;
|
|
6477
|
+
this.securityInsights =
|
|
6478
|
+
new Resource$Customers$Enterprise$Securityinsights(this.context);
|
|
6479
|
+
}
|
|
6480
|
+
}
|
|
6481
|
+
|
|
6482
|
+
export class Resource$Customers$Enterprise$Securityinsights {
|
|
6483
|
+
context: APIRequestContext;
|
|
6484
|
+
constructor(context: APIRequestContext) {
|
|
6485
|
+
this.context = context;
|
|
6486
|
+
}
|
|
6487
|
+
|
|
6488
|
+
/**
|
|
6489
|
+
* Gets the setting state of the insights feature for the customer.
|
|
6490
|
+
* @example
|
|
6491
|
+
* ```js
|
|
6492
|
+
* // Before running the sample:
|
|
6493
|
+
* // - Enable the API at:
|
|
6494
|
+
* // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
|
|
6495
|
+
* // - Login into gcloud by running:
|
|
6496
|
+
* // ```sh
|
|
6497
|
+
* // $ gcloud auth application-default login
|
|
6498
|
+
* // ```
|
|
6499
|
+
* // - Install the npm module by running:
|
|
6500
|
+
* // ```sh
|
|
6501
|
+
* // $ npm install googleapis
|
|
6502
|
+
* // ```
|
|
6503
|
+
*
|
|
6504
|
+
* const {google} = require('googleapis');
|
|
6505
|
+
* const chromemanagement = google.chromemanagement('v1');
|
|
6506
|
+
*
|
|
6507
|
+
* async function main() {
|
|
6508
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6509
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6510
|
+
* scopes: [],
|
|
6511
|
+
* });
|
|
6512
|
+
*
|
|
6513
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6514
|
+
* const authClient = await auth.getClient();
|
|
6515
|
+
* google.options({auth: authClient});
|
|
6516
|
+
*
|
|
6517
|
+
* // Do the magic
|
|
6518
|
+
* const res =
|
|
6519
|
+
* await chromemanagement.customers.enterprise.securityInsights.checkEnablementStatus(
|
|
6520
|
+
* {
|
|
6521
|
+
* // Required. The customer to check the enablement status for. Format: customers/{customer_id\}
|
|
6522
|
+
* customer: 'customers/my-customer',
|
|
6523
|
+
* },
|
|
6524
|
+
* );
|
|
6525
|
+
* console.log(res.data);
|
|
6526
|
+
*
|
|
6527
|
+
* // Example response
|
|
6528
|
+
* // {
|
|
6529
|
+
* // "insightsState": "my_insightsState"
|
|
6530
|
+
* // }
|
|
6531
|
+
* }
|
|
6532
|
+
*
|
|
6533
|
+
* main().catch(e => {
|
|
6534
|
+
* console.error(e);
|
|
6535
|
+
* throw e;
|
|
6536
|
+
* });
|
|
6537
|
+
*
|
|
6538
|
+
* ```
|
|
6539
|
+
*
|
|
6540
|
+
* @param params - Parameters for request
|
|
6541
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6542
|
+
* @param callback - Optional callback that handles the response.
|
|
6543
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6544
|
+
*/
|
|
6545
|
+
checkEnablementStatus(
|
|
6546
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus,
|
|
6547
|
+
options: StreamMethodOptions
|
|
6548
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6549
|
+
checkEnablementStatus(
|
|
6550
|
+
params?: Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus,
|
|
6551
|
+
options?: MethodOptions
|
|
6552
|
+
): Promise<
|
|
6553
|
+
GaxiosResponseWithHTTP2<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6554
|
+
>;
|
|
6555
|
+
checkEnablementStatus(
|
|
6556
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus,
|
|
6557
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6558
|
+
callback: BodyResponseCallback<Readable>
|
|
6559
|
+
): void;
|
|
6560
|
+
checkEnablementStatus(
|
|
6561
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus,
|
|
6562
|
+
options:
|
|
6563
|
+
| MethodOptions
|
|
6564
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>,
|
|
6565
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6566
|
+
): void;
|
|
6567
|
+
checkEnablementStatus(
|
|
6568
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus,
|
|
6569
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6570
|
+
): void;
|
|
6571
|
+
checkEnablementStatus(
|
|
6572
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6573
|
+
): void;
|
|
6574
|
+
checkEnablementStatus(
|
|
6575
|
+
paramsOrCallback?:
|
|
6576
|
+
| Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus
|
|
6577
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6578
|
+
| BodyResponseCallback<Readable>,
|
|
6579
|
+
optionsOrCallback?:
|
|
6580
|
+
| MethodOptions
|
|
6581
|
+
| StreamMethodOptions
|
|
6582
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6583
|
+
| BodyResponseCallback<Readable>,
|
|
6584
|
+
callback?:
|
|
6585
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6586
|
+
| BodyResponseCallback<Readable>
|
|
6587
|
+
):
|
|
6588
|
+
| void
|
|
6589
|
+
| Promise<
|
|
6590
|
+
GaxiosResponseWithHTTP2<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>
|
|
6591
|
+
>
|
|
6592
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6593
|
+
let params = (paramsOrCallback ||
|
|
6594
|
+
{}) as Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus;
|
|
6595
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6596
|
+
|
|
6597
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6598
|
+
callback = paramsOrCallback;
|
|
6599
|
+
params =
|
|
6600
|
+
{} as Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus;
|
|
6601
|
+
options = {};
|
|
6602
|
+
}
|
|
6603
|
+
|
|
6604
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6605
|
+
callback = optionsOrCallback;
|
|
6606
|
+
options = {};
|
|
6607
|
+
}
|
|
6608
|
+
|
|
6609
|
+
const rootUrl =
|
|
6610
|
+
options.rootUrl || 'https://chromemanagement.googleapis.com/';
|
|
6611
|
+
const parameters = {
|
|
6612
|
+
options: Object.assign(
|
|
6613
|
+
{
|
|
6614
|
+
url: (
|
|
6615
|
+
rootUrl +
|
|
6616
|
+
'/v1/{+customer}/enterprise/securityInsights:checkEnablementStatus'
|
|
6617
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
6618
|
+
method: 'GET',
|
|
6619
|
+
apiVersion: '',
|
|
6620
|
+
},
|
|
6621
|
+
options
|
|
6622
|
+
),
|
|
6623
|
+
params,
|
|
6624
|
+
requiredParams: ['customer'],
|
|
6625
|
+
pathParams: ['customer'],
|
|
6626
|
+
context: this.context,
|
|
6627
|
+
};
|
|
6628
|
+
if (callback) {
|
|
6629
|
+
createAPIRequest<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>(
|
|
6630
|
+
parameters,
|
|
6631
|
+
callback as BodyResponseCallback<unknown>
|
|
6632
|
+
);
|
|
6633
|
+
} else {
|
|
6634
|
+
return createAPIRequest<Schema$GoogleChromeManagementVersionsV1CheckEnablementStatusResponse>(
|
|
6635
|
+
parameters
|
|
6636
|
+
);
|
|
6637
|
+
}
|
|
6638
|
+
}
|
|
6639
|
+
|
|
6640
|
+
/**
|
|
6641
|
+
* Disables insights for the customer.
|
|
6642
|
+
* @example
|
|
6643
|
+
* ```js
|
|
6644
|
+
* // Before running the sample:
|
|
6645
|
+
* // - Enable the API at:
|
|
6646
|
+
* // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
|
|
6647
|
+
* // - Login into gcloud by running:
|
|
6648
|
+
* // ```sh
|
|
6649
|
+
* // $ gcloud auth application-default login
|
|
6650
|
+
* // ```
|
|
6651
|
+
* // - Install the npm module by running:
|
|
6652
|
+
* // ```sh
|
|
6653
|
+
* // $ npm install googleapis
|
|
6654
|
+
* // ```
|
|
6655
|
+
*
|
|
6656
|
+
* const {google} = require('googleapis');
|
|
6657
|
+
* const chromemanagement = google.chromemanagement('v1');
|
|
6658
|
+
*
|
|
6659
|
+
* async function main() {
|
|
6660
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6661
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6662
|
+
* scopes: [],
|
|
6663
|
+
* });
|
|
6664
|
+
*
|
|
6665
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6666
|
+
* const authClient = await auth.getClient();
|
|
6667
|
+
* google.options({auth: authClient});
|
|
6668
|
+
*
|
|
6669
|
+
* // Do the magic
|
|
6670
|
+
* const res =
|
|
6671
|
+
* await chromemanagement.customers.enterprise.securityInsights.disable({
|
|
6672
|
+
* // Required. The customer to disable insights for. Format: customers/{customer\}
|
|
6673
|
+
* customer: 'customers/my-customer',
|
|
6674
|
+
*
|
|
6675
|
+
* // Request body metadata
|
|
6676
|
+
* requestBody: {
|
|
6677
|
+
* // request body parameters
|
|
6678
|
+
* // {}
|
|
6679
|
+
* },
|
|
6680
|
+
* });
|
|
6681
|
+
* console.log(res.data);
|
|
6682
|
+
*
|
|
6683
|
+
* // Example response
|
|
6684
|
+
* // {
|
|
6685
|
+
* // "insightsState": "my_insightsState"
|
|
6686
|
+
* // }
|
|
6687
|
+
* }
|
|
6688
|
+
*
|
|
6689
|
+
* main().catch(e => {
|
|
6690
|
+
* console.error(e);
|
|
6691
|
+
* throw e;
|
|
6692
|
+
* });
|
|
6693
|
+
*
|
|
6694
|
+
* ```
|
|
6695
|
+
*
|
|
6696
|
+
* @param params - Parameters for request
|
|
6697
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6698
|
+
* @param callback - Optional callback that handles the response.
|
|
6699
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6700
|
+
*/
|
|
6701
|
+
disable(
|
|
6702
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Disable,
|
|
6703
|
+
options: StreamMethodOptions
|
|
6704
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6705
|
+
disable(
|
|
6706
|
+
params?: Params$Resource$Customers$Enterprise$Securityinsights$Disable,
|
|
6707
|
+
options?: MethodOptions
|
|
6708
|
+
): Promise<
|
|
6709
|
+
GaxiosResponseWithHTTP2<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6710
|
+
>;
|
|
6711
|
+
disable(
|
|
6712
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Disable,
|
|
6713
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6714
|
+
callback: BodyResponseCallback<Readable>
|
|
6715
|
+
): void;
|
|
6716
|
+
disable(
|
|
6717
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Disable,
|
|
6718
|
+
options:
|
|
6719
|
+
| MethodOptions
|
|
6720
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>,
|
|
6721
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6722
|
+
): void;
|
|
6723
|
+
disable(
|
|
6724
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Disable,
|
|
6725
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6726
|
+
): void;
|
|
6727
|
+
disable(
|
|
6728
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6729
|
+
): void;
|
|
6730
|
+
disable(
|
|
6731
|
+
paramsOrCallback?:
|
|
6732
|
+
| Params$Resource$Customers$Enterprise$Securityinsights$Disable
|
|
6733
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6734
|
+
| BodyResponseCallback<Readable>,
|
|
6735
|
+
optionsOrCallback?:
|
|
6736
|
+
| MethodOptions
|
|
6737
|
+
| StreamMethodOptions
|
|
6738
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6739
|
+
| BodyResponseCallback<Readable>,
|
|
6740
|
+
callback?:
|
|
6741
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6742
|
+
| BodyResponseCallback<Readable>
|
|
6743
|
+
):
|
|
6744
|
+
| void
|
|
6745
|
+
| Promise<
|
|
6746
|
+
GaxiosResponseWithHTTP2<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>
|
|
6747
|
+
>
|
|
6748
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6749
|
+
let params = (paramsOrCallback ||
|
|
6750
|
+
{}) as Params$Resource$Customers$Enterprise$Securityinsights$Disable;
|
|
6751
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6752
|
+
|
|
6753
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6754
|
+
callback = paramsOrCallback;
|
|
6755
|
+
params =
|
|
6756
|
+
{} as Params$Resource$Customers$Enterprise$Securityinsights$Disable;
|
|
6757
|
+
options = {};
|
|
6758
|
+
}
|
|
6759
|
+
|
|
6760
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6761
|
+
callback = optionsOrCallback;
|
|
6762
|
+
options = {};
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6765
|
+
const rootUrl =
|
|
6766
|
+
options.rootUrl || 'https://chromemanagement.googleapis.com/';
|
|
6767
|
+
const parameters = {
|
|
6768
|
+
options: Object.assign(
|
|
6769
|
+
{
|
|
6770
|
+
url: (
|
|
6771
|
+
rootUrl + '/v1/{+customer}/enterprise/securityInsights:disable'
|
|
6772
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
6773
|
+
method: 'POST',
|
|
6774
|
+
apiVersion: '',
|
|
6775
|
+
},
|
|
6776
|
+
options
|
|
6777
|
+
),
|
|
6778
|
+
params,
|
|
6779
|
+
requiredParams: ['customer'],
|
|
6780
|
+
pathParams: ['customer'],
|
|
6781
|
+
context: this.context,
|
|
6782
|
+
};
|
|
6783
|
+
if (callback) {
|
|
6784
|
+
createAPIRequest<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>(
|
|
6785
|
+
parameters,
|
|
6786
|
+
callback as BodyResponseCallback<unknown>
|
|
6787
|
+
);
|
|
6788
|
+
} else {
|
|
6789
|
+
return createAPIRequest<Schema$GoogleChromeManagementVersionsV1DisableInsightsResponse>(
|
|
6790
|
+
parameters
|
|
6791
|
+
);
|
|
6792
|
+
}
|
|
6793
|
+
}
|
|
6794
|
+
|
|
6795
|
+
/**
|
|
6796
|
+
* Enables insights for the customer and sets up required chrome connectors.
|
|
6797
|
+
* @example
|
|
6798
|
+
* ```js
|
|
6799
|
+
* // Before running the sample:
|
|
6800
|
+
* // - Enable the API at:
|
|
6801
|
+
* // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
|
|
6802
|
+
* // - Login into gcloud by running:
|
|
6803
|
+
* // ```sh
|
|
6804
|
+
* // $ gcloud auth application-default login
|
|
6805
|
+
* // ```
|
|
6806
|
+
* // - Install the npm module by running:
|
|
6807
|
+
* // ```sh
|
|
6808
|
+
* // $ npm install googleapis
|
|
6809
|
+
* // ```
|
|
6810
|
+
*
|
|
6811
|
+
* const {google} = require('googleapis');
|
|
6812
|
+
* const chromemanagement = google.chromemanagement('v1');
|
|
6813
|
+
*
|
|
6814
|
+
* async function main() {
|
|
6815
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6816
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6817
|
+
* scopes: [],
|
|
6818
|
+
* });
|
|
6819
|
+
*
|
|
6820
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6821
|
+
* const authClient = await auth.getClient();
|
|
6822
|
+
* google.options({auth: authClient});
|
|
6823
|
+
*
|
|
6824
|
+
* // Do the magic
|
|
6825
|
+
* const res =
|
|
6826
|
+
* await chromemanagement.customers.enterprise.securityInsights.enable({
|
|
6827
|
+
* // Required. The customer to enable insights for. Format: customers/{customer\}
|
|
6828
|
+
* customer: 'customers/my-customer',
|
|
6829
|
+
*
|
|
6830
|
+
* // Request body metadata
|
|
6831
|
+
* requestBody: {
|
|
6832
|
+
* // request body parameters
|
|
6833
|
+
* // {
|
|
6834
|
+
* // "targetOus": []
|
|
6835
|
+
* // }
|
|
6836
|
+
* },
|
|
6837
|
+
* });
|
|
6838
|
+
* console.log(res.data);
|
|
6839
|
+
*
|
|
6840
|
+
* // Example response
|
|
6841
|
+
* // {
|
|
6842
|
+
* // "insightsState": "my_insightsState"
|
|
6843
|
+
* // }
|
|
6844
|
+
* }
|
|
6845
|
+
*
|
|
6846
|
+
* main().catch(e => {
|
|
6847
|
+
* console.error(e);
|
|
6848
|
+
* throw e;
|
|
6849
|
+
* });
|
|
6850
|
+
*
|
|
6851
|
+
* ```
|
|
6852
|
+
*
|
|
6853
|
+
* @param params - Parameters for request
|
|
6854
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6855
|
+
* @param callback - Optional callback that handles the response.
|
|
6856
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6857
|
+
*/
|
|
6858
|
+
enable(
|
|
6859
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Enable,
|
|
6860
|
+
options: StreamMethodOptions
|
|
6861
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6862
|
+
enable(
|
|
6863
|
+
params?: Params$Resource$Customers$Enterprise$Securityinsights$Enable,
|
|
6864
|
+
options?: MethodOptions
|
|
6865
|
+
): Promise<
|
|
6866
|
+
GaxiosResponseWithHTTP2<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6867
|
+
>;
|
|
6868
|
+
enable(
|
|
6869
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Enable,
|
|
6870
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6871
|
+
callback: BodyResponseCallback<Readable>
|
|
6872
|
+
): void;
|
|
6873
|
+
enable(
|
|
6874
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Enable,
|
|
6875
|
+
options:
|
|
6876
|
+
| MethodOptions
|
|
6877
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>,
|
|
6878
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6879
|
+
): void;
|
|
6880
|
+
enable(
|
|
6881
|
+
params: Params$Resource$Customers$Enterprise$Securityinsights$Enable,
|
|
6882
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6883
|
+
): void;
|
|
6884
|
+
enable(
|
|
6885
|
+
callback: BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6886
|
+
): void;
|
|
6887
|
+
enable(
|
|
6888
|
+
paramsOrCallback?:
|
|
6889
|
+
| Params$Resource$Customers$Enterprise$Securityinsights$Enable
|
|
6890
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6891
|
+
| BodyResponseCallback<Readable>,
|
|
6892
|
+
optionsOrCallback?:
|
|
6893
|
+
| MethodOptions
|
|
6894
|
+
| StreamMethodOptions
|
|
6895
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6896
|
+
| BodyResponseCallback<Readable>,
|
|
6897
|
+
callback?:
|
|
6898
|
+
| BodyResponseCallback<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6899
|
+
| BodyResponseCallback<Readable>
|
|
6900
|
+
):
|
|
6901
|
+
| void
|
|
6902
|
+
| Promise<
|
|
6903
|
+
GaxiosResponseWithHTTP2<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>
|
|
6904
|
+
>
|
|
6905
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6906
|
+
let params = (paramsOrCallback ||
|
|
6907
|
+
{}) as Params$Resource$Customers$Enterprise$Securityinsights$Enable;
|
|
6908
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6909
|
+
|
|
6910
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6911
|
+
callback = paramsOrCallback;
|
|
6912
|
+
params =
|
|
6913
|
+
{} as Params$Resource$Customers$Enterprise$Securityinsights$Enable;
|
|
6914
|
+
options = {};
|
|
6915
|
+
}
|
|
6916
|
+
|
|
6917
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6918
|
+
callback = optionsOrCallback;
|
|
6919
|
+
options = {};
|
|
6920
|
+
}
|
|
6921
|
+
|
|
6922
|
+
const rootUrl =
|
|
6923
|
+
options.rootUrl || 'https://chromemanagement.googleapis.com/';
|
|
6924
|
+
const parameters = {
|
|
6925
|
+
options: Object.assign(
|
|
6926
|
+
{
|
|
6927
|
+
url: (
|
|
6928
|
+
rootUrl + '/v1/{+customer}/enterprise/securityInsights:enable'
|
|
6929
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
6930
|
+
method: 'POST',
|
|
6931
|
+
apiVersion: '',
|
|
6932
|
+
},
|
|
6933
|
+
options
|
|
6934
|
+
),
|
|
6935
|
+
params,
|
|
6936
|
+
requiredParams: ['customer'],
|
|
6937
|
+
pathParams: ['customer'],
|
|
6938
|
+
context: this.context,
|
|
6939
|
+
};
|
|
6940
|
+
if (callback) {
|
|
6941
|
+
createAPIRequest<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>(
|
|
6942
|
+
parameters,
|
|
6943
|
+
callback as BodyResponseCallback<unknown>
|
|
6944
|
+
);
|
|
6945
|
+
} else {
|
|
6946
|
+
return createAPIRequest<Schema$GoogleChromeManagementVersionsV1EnableInsightsResponse>(
|
|
6947
|
+
parameters
|
|
6948
|
+
);
|
|
6949
|
+
}
|
|
6950
|
+
}
|
|
6951
|
+
}
|
|
6952
|
+
|
|
6953
|
+
export interface Params$Resource$Customers$Enterprise$Securityinsights$Checkenablementstatus extends StandardParameters {
|
|
6954
|
+
/**
|
|
6955
|
+
* Required. The customer to check the enablement status for. Format: customers/{customer_id\}
|
|
6956
|
+
*/
|
|
6957
|
+
customer?: string;
|
|
6958
|
+
}
|
|
6959
|
+
export interface Params$Resource$Customers$Enterprise$Securityinsights$Disable extends StandardParameters {
|
|
6960
|
+
/**
|
|
6961
|
+
* Required. The customer to disable insights for. Format: customers/{customer\}
|
|
6962
|
+
*/
|
|
6963
|
+
customer?: string;
|
|
6964
|
+
|
|
6965
|
+
/**
|
|
6966
|
+
* Request body metadata
|
|
6967
|
+
*/
|
|
6968
|
+
requestBody?: Schema$GoogleChromeManagementVersionsV1DisableInsightsRequest;
|
|
6969
|
+
}
|
|
6970
|
+
export interface Params$Resource$Customers$Enterprise$Securityinsights$Enable extends StandardParameters {
|
|
6971
|
+
/**
|
|
6972
|
+
* Required. The customer to enable insights for. Format: customers/{customer\}
|
|
6973
|
+
*/
|
|
6974
|
+
customer?: string;
|
|
6975
|
+
|
|
6976
|
+
/**
|
|
6977
|
+
* Request body metadata
|
|
6978
|
+
*/
|
|
6979
|
+
requestBody?: Schema$GoogleChromeManagementVersionsV1EnableInsightsRequest;
|
|
6980
|
+
}
|
|
6981
|
+
|
|
6430
6982
|
export class Resource$Customers$Profiles {
|
|
6431
6983
|
context: APIRequestContext;
|
|
6432
6984
|
commands: Resource$Customers$Profiles$Commands;
|